Package com.luciad.models.features
Class ObservableFeatureUtil
java.lang.Object
com.luciad.models.features.ObservableFeatureUtil
This class provides utility methods for
Observable
instance for Feature
.-
Method Summary
Modifier and TypeMethodDescriptionstatic Observable
<@Nullable Geometry> deriveGeometry
(Observable<@NotNull Feature> observableFeature, IFeatureGeometryProvider geometryProvider) Derives anObservable
Geometry
from the given observable feature.
-
Method Details
-
deriveGeometry
@NotNull public static Observable<@Nullable Geometry> deriveGeometry(@NotNull Observable<@NotNull Feature> observableFeature, @NotNull IFeatureGeometryProvider geometryProvider) throws NullPointerException Derives anObservable
Geometry
from the given observable feature.This observable geometry will be updated when the given observable feature is updated.
Notes:
- When this method can not derive a geometry instance using the given
IFeatureGeometryProvider
, anObservable
instance will be created with anull
value. - A
null
value can also be set on an existingObservable
Geometry
instance afterObservable
Feature
changes, and no geometry instance can be derived. Observable#setValue
will throw an exception for derived instances.
- Parameters:
observableFeature
- an observable feature from which to derive a geometry. Cannot benull
.geometryProvider
- the geometry provider used to extract a geometry from the feature. This provider is used initially, and when the given ObservableFeature changes. Cannot benull
.- Returns:
- a derived
Observable
- Throws:
NullPointerException
- when passingnull
values.
- When this method can not derive a geometry instance using the given
-