- Type Parameters:
R
- the type of resources used as inputs. This is ignored by literals.V
- the type of the value given by the literal.
- All Superinterfaces:
Expression<R,
,V> Function<R,
V>
@UML(identifier="Literal",
specification=ISO_19143)
public interface Literal<R,V>
extends Expression<R,V>
A constant value that can be used in expressions.
The
apply(R)
method of this class must return the same value as getValue()
.
Note:
the content of
getValue()
may be persisted with XML based technologies.
As an example a Geometry
may be written out using GML.
Consequently, the value should be data objects such as strings, numbers, dates, or geometries.
It should not be state of operations.- Since:
- 3.1
-
Method Summary
Modifier and TypeMethodDescriptiondefault V
Evaluates the expression value.default ScopedName
Returns the name of the literal function.default List<Expression<? super R,
?>> Returns an empty list since literals have no parameters.getValue()
Returns the constant value held by this object.Methods inherited from interface Expression
toValueType
-
Method Details
-
getFunctionName
Returns the name of the literal function. The default implementation returns"fes:Literal"
.- Specified by:
getFunctionName
in interfaceExpression<R,
V> - Returns:
"Literal"
in a scope at implementation choice.
-
getParameters
Returns an empty list since literals have no parameters.- Specified by:
getParameters
in interfaceExpression<R,
V> - Returns:
- an empty list.
-
getValue
Returns the constant value held by this object. It should be a data object such as a string, number, date or geometry.- Returns:
- the literal value. May be
null
.
-
apply
Evaluates the expression value. Shall be the same value asgetValue()
.
-