Interface Literal<T>
- Type Parameters:
T- the native type of the Literal
- All Superinterfaces:
fr.inria.rules.dlgpemodel.api.elems.ILiteral, fr.inria.rules.dlgpemodel.api.sentences.IPrintable, fr.inria.rules.dlgpemodel.api.elems.ITerm, Standardizable, Substitutable<Term>, Term
- All Known Implementing Classes:
LiteralImpl
A Literal is a typed constant representing strings, numbers, dates…
- Author:
- Florent Tornil
-
Field Summary
Fields inherited from interface fr.inria.rules.dlgpemodel.api.elems.ILiteral
BOOLEAN_LITERAL_TYPE, DOUBLE_LITERAL_TYPE, FLOAT_LITERAL_TYPE, INTEGER_LITERAL_TYPE, LONG_LITERAL_TYPE, STRING_LITERAL_TYPEFields inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable
WRITER -
Method Summary
Modifier and TypeMethodDescriptionapplySubstitution(Substitution substitution, boolean evaluate) Applies a substitution to this term.default booleanisGround()Indicates that literals are always ground terms.default booleanIndicates whether this term is a literal.default StringtoStandardForm(Boolean shortForm) Returns the standardized textual form.value()Returns the native Java value carried by this literal.Methods inherited from interface fr.inria.rules.dlgpemodel.api.elems.ILiteral
getDatatype, getRepresentationMethods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable
toDLGPEMethods inherited from interface Standardizable
toStandardFormMethods inherited from interface Term
applySubstitution, isConstant, isEvaluableFunction, isFrozen, isFunctionalTerm, isVariable, label
-
Method Details
-
isLiteral
-
isGround
-
value
T value()Returns the native Java value carried by this literal.- Returns:
- the value of this Literal as a native Java object
-
applySubstitution
Description copied from interface:TermApplies a substitution to this term.- Specified by:
applySubstitutionin interfaceSubstitutable<T>- Specified by:
applySubstitutionin interfaceTerm- Parameters:
substitution- the substitution to applyevaluate- whether nested evaluable functions should be evaluated- Returns:
- the substituted term
-
toStandardForm
Description copied from interface:StandardizableReturns the standardized textual form.- Specified by:
toStandardFormin interfaceStandardizable- Parameters:
shortForm- indicates whether the generated form should take into account the prefix system- Returns:
- the standardized form
-