Class GroupAsPolylineOperation.Result<G>
java.lang.Object
org.apache.sis.feature.Property
org.apache.sis.feature.Field<V>
org.apache.sis.feature.AbstractAttribute<G>
org.apache.sis.internal.storage.gpx.GroupAsPolylineOperation.Result<G>
- Type Parameters:
G- the root geometry class (implementation-dependent).
- All Implemented Interfaces:
Serializable
- Enclosing class:
- GroupAsPolylineOperation
The attribute resulting from execution if the
GroupAsPolylineOperation.
The value is computed when first requested, then cached for this Result instance only.
Note that the cache is not used when apply(Feature, ParameterValueGroup) is invoked,
causing a new value to be computed again. The intent is to behave as if the operation has been
executed at apply(…) invocation time, even if we deferred the actual execution.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringName of the property to follow in order to get the geometries to add to a polyline.private final AbstractFeatureThe feature on which to execute the operation.private GThe result, computed when first needed.private static final longFor cross-version compatibility. -
Constructor Summary
ConstructorsConstructorDescriptionResult(AbstractFeature feature, String association, DefaultAttributeType<G> result) Creates a new result for an execution on the given feature. -
Method Summary
Methods inherited from class org.apache.sis.feature.AbstractAttribute
characteristics, clone, create, getName, getType, getValues, quality, setValues, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
feature
The feature on which to execute the operation. -
association
Name of the property to follow in order to get the geometries to add to a polyline. This property shall be a feature association, usually with [0 … ∞] multiplicity. -
geometry
The result, computed when first needed.
-
-
Constructor Details
-
Result
Result(AbstractFeature feature, String association, DefaultAttributeType<G> result) Creates a new result for an execution on the given feature. The actual computation is deferred to the first call ofgetValue().
-
-
Method Details
-
getValue
Computes the geometry from all points or polylines found in the associated feature.- Specified by:
getValuein classAbstractAttribute<G>- Returns:
- the attribute value (may be
null). - Throws:
ClassCastException- if a feature, a property value or a geometry is not of the expected class. This exception should not happen since we usefeaturein contexts where types are known.- See Also:
-
setValue
Does not allow modification of this attribute.- Specified by:
setValuein classAbstractAttribute<G>- Parameters:
value- the new value, ornullfor removing all values from this attribute.- See Also:
-