Interface Literal<T>
- Type Parameters:
T- the type of the literal
- All Superinterfaces:
Expression<T>, SyntaxElement
- All Known Implementing Classes:
LiteralList, LitFunctionParameter, LitScriptName, LitTimeConstants, SimpleLiteral
An expression whose value is known at parse time
-
Method Summary
Modifier and TypeMethodDescriptionT[]default T[]getValues(TriggerContext ctx) Retrieves all values of this Expression, accounting for possible modifiers.static booleanisLiteral(Expression<?> exp) Methods inherited from interface Expression
acceptsChange, acceptsChange, acceptsChange, change, check, check, convertExpression, getArray, getReturnType, getSingle, getSource, isAndList, isLoopOf, isSingle, iterator, setAndList, streamMethods inherited from interface SyntaxElement
init, toString
-
Method Details
-
getValues
T[] getValues() -
getSingle
-
getValues
Description copied from interface:ExpressionRetrieves all values of this Expression, accounting for possible modifiers. This means that if this is an or-list, it will choose a random value to return.- Specified by:
getValuesin interfaceExpression<T>- Parameters:
ctx- the event- Returns:
- an array of the values
- See Also:
-
isLiteral
-