Package org.apache.sis.filter
Class PropertyValue.CastedAndConverted<S,V>
java.lang.Object
org.apache.sis.internal.filter.Node
org.apache.sis.filter.LeafExpression<AbstractFeature,V>
org.apache.sis.filter.PropertyValue<V>
org.apache.sis.filter.PropertyValue.Converted<V>
org.apache.sis.filter.PropertyValue.CastedAndConverted<S,V>
- Type Parameters:
S- the type of source value before conversion.V- the type of value computed by the expression.
- All Implemented Interfaces:
Serializable,Function<AbstractFeature,,V> Expression<AbstractFeature,,V> Optimization.OnExpression<AbstractFeature,,V> FeatureExpression<AbstractFeature,,V> ValueReference<AbstractFeature,V>
- Enclosing class:
- PropertyValue<V>
An expression fetching property values as an object of specified type.
The value is first casted from
Object to the expected source type,
then converted to the specified target type.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.filter.LeafExpression
LeafExpression.Literal<R,V>, LeafExpression.Transformed<R, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ObjectConverter<? super S,? extends V> The conversion from source type to the type to be returned.private static final longFor cross-version compatibility.The source type before conversion.Fields inherited from class org.apache.sis.filter.PropertyValue.Converted
typeFields inherited from class org.apache.sis.filter.PropertyValue
isVirtual, name, VIRTUAL_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(AbstractFeature instance) Returns the value of the property of the given name.Returns the type of values fetched fromAbstractFeatureinstance.Methods inherited from class org.apache.sis.filter.PropertyValue.Converted
expectedType, getValueClass, optimizeMethods inherited from class org.apache.sis.filter.PropertyValue
create, expectedType, getChildren, getFunctionName, getXPath, toValueTypeMethods inherited from class org.apache.sis.filter.LeafExpression
getParametersMethods inherited from class org.apache.sis.internal.filter.Node
createName, createType, equals, getGeometryLibrary, hashCode, symbol, toGeometryWrapper, toString, unwrap, warningMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sis.filter.Expression
getParametersMethods inherited from interface org.apache.sis.filter.Optimization.OnExpression
recreate
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
source
The source type before conversion. -
converter
The conversion from source type to the type to be returned.
-
-
Constructor Details
-
CastedAndConverted
Creates a new expression retrieving values from a property of the given name.
-
-
Method Details
-
getSourceClass
Returns the type of values fetched fromAbstractFeatureinstance.- Overrides:
getSourceClassin classPropertyValue<V>
-
apply
Returns the value of the property of the given name. If no value is found for the given feature, then this method returnsnull.- Specified by:
applyin interfaceExpression<S,V> - Specified by:
applyin interfaceFunction<S,V> - Overrides:
applyin classPropertyValue.Converted<V>- Parameters:
instance- the object to be evaluated by the expression. Can benullif this expression allows null values.- Returns:
- value computed by the expression.
-