Skip to contentPackage: GeoTrackProvider
GeoTrackProvider
Coverage
1: package it.tidalwave.geo;
2:
3: import jakarta.annotation.Nonnull;
4: import java.util.function.Supplier;
5:
6: /***************************************************************************************************************************************************************
7: *
8: * A role that provides a {@link GeoTrack} or a {@link Supplier} for lazy retrieval.
9: *
10: * @stereotype Role
11: * @author Fabrizio Giudici
12: *
13: **************************************************************************************************************************************************************/
14: public interface GeoTrackProvider
15: {
16: public static final Class<GeoTrackProvider> _GeoTrackProvider_ = GeoTrackProvider.class;
17:
18: /***********************************************************************************************************************************************************
19: * {@return the {@link GeoTrack}}.
20: **********************************************************************************************************************************************************/
21: @Nonnull
22: public default GeoTrack getTrack()
23: {
24: return getTrackSupplier().get();
25: }
26:
27: /***********************************************************************************************************************************************************
28: * {@return a {@link GeoTrack} {@link Supplier}}.
29: **********************************************************************************************************************************************************/
30: @Nonnull
31: public Supplier<GeoTrack> getTrackSupplier();
32: }