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 long
For cross-version compatibility.The source type before conversion.Fields inherited from class org.apache.sis.filter.PropertyValue.Converted
type
Fields 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 fromAbstractFeature
instance.Methods inherited from class org.apache.sis.filter.PropertyValue.Converted
expectedType, getValueClass, optimize
Methods inherited from class org.apache.sis.filter.PropertyValue
create, expectedType, getChildren, getFunctionName, getXPath, toValueType
Methods inherited from class org.apache.sis.filter.LeafExpression
getParameters
Methods inherited from class org.apache.sis.internal.filter.Node
createName, createType, equals, getGeometryLibrary, hashCode, symbol, toGeometryWrapper, toString, unwrap, warning
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.sis.filter.Expression
getParameters
Methods 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 fromAbstractFeature
instance.- Overrides:
getSourceClass
in 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:
apply
in interfaceExpression<S,
V> - Specified by:
apply
in interfaceFunction<S,
V> - Overrides:
apply
in classPropertyValue.Converted<V>
- Parameters:
instance
- the object to be evaluated by the expression. Can benull
if this expression allows null values.- Returns:
- value computed by the expression.
-