Class PropertyValue.Converted<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>
- Type Parameters:
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>
- Direct Known Subclasses:
PropertyValue.CastedAndConverted
- Enclosing class:
PropertyValue<V>
An expression fetching property values as an object of specified type.
The value is converted from
Object to the specified type.- Since:
- 1.1
- Version:
- 1.2
-
Nested Class Summary
Nested classes/interfaces inherited from class LeafExpression
LeafExpression.Literal<R,V>, LeafExpression.Transformed<R, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFor cross-version compatibility.The desired type of values.Fields inherited from class 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.final PropertyTypeBuilderexpectedType(DefaultFeatureType valueType, FeatureTypeBuilder addTo) Provides the expected type of values produced by this expression when a feature of the given type is evaluated.Returns the type of values computed by this expression.final PropertyValue<V> optimize(Optimization optimization) Tries to optimize this expression.Methods inherited from class PropertyValue
create, expectedType, getChildren, getFunctionName, getSourceClass, getXPath, toValueTypeMethods inherited from class LeafExpression
getParametersMethods inherited from class Node
createName, createType, equals, getGeometryLibrary, hashCode, symbol, toGeometryWrapper, toString, unwrap, warningMethods inherited from interface Expression
getParametersMethods inherited from interface Optimization.OnExpression
recreate
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
type
-
-
Constructor Details
-
Converted
-
-
Method Details
-
getValueClass
-
apply
Returns the value of the property of the given name. If no value is found for the given feature, then this method returnsnull.- Parameters:
instance- the object to be evaluated by the expression. Can benullif this expression allows null values.- Returns:
- value computed by the expression.
-
optimize
Tries to optimize this expression. If anObjectConvertercan be determined in advance for the feature type for which to optimize, then a specialized expression is returned. Otherwise this method returnsthis.- Specified by:
optimizein interfaceOptimization.OnExpression<AbstractFeature, V>- Specified by:
optimizein classPropertyValue<V>- Parameters:
optimization- the simplifications or optimizations to apply on this expression.- Returns:
- the simplified or optimized expression, or
thisif no optimization has been applied.
-
expectedType
public final PropertyTypeBuilder expectedType(DefaultFeatureType valueType, FeatureTypeBuilder addTo) Provides the expected type of values produced by this expression when a feature of the given type is evaluated.- Specified by:
expectedTypein interfaceFeatureExpression<AbstractFeature, V>- Overrides:
expectedTypein classPropertyValue<V>- Parameters:
valueType- the type of features to be evaluated by the given expression.addTo- where to add the type of properties evaluated by the given expression.- Returns:
- builder of the added property, or
nullif this method cannot add a property.
-