Interface Literal<R,V>

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 Details

    • getFunctionName

      default ScopedName getFunctionName()
      Returns the name of the literal function. The default implementation returns "fes:Literal".
      Specified by:
      getFunctionName in interface Expression<R,V>
      Returns:
      "Literal" in a scope at implementation choice.
    • getParameters

      default List<Expression<? super R,?>> getParameters()
      Returns an empty list since literals have no parameters.
      Specified by:
      getParameters in interface Expression<R,V>
      Returns:
      an empty list.
    • getValue

      @UML(identifier="value", specification=ISO_19143) V 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

      default V apply(R input)
      Evaluates the expression value. Shall be the same value as getValue().
      Specified by:
      apply in interface Expression<R,V>
      Specified by:
      apply in interface Function<R,V>
      Parameters:
      input - ignored (may be null).
      Returns:
      the literal value.