Class LiteralList<T>
java.lang.Object
io.github.syst3ms.skriptparser.lang.ExpressionList<T>
io.github.syst3ms.skriptparser.lang.LiteralList<T>
- Type Parameters:
T- the common supertype of all literals in the list
- All Implemented Interfaces:
Expression<T>, Literal<T>, SyntaxElement
A list of literals, whose values are known at parse time
- See Also:
-
Field Summary
Fields inherited from class ExpressionList
and, expressions, single -
Constructor Summary
ConstructorsConstructorDescriptionLiteralList(Literal<? extends T>[] literals, Class<T> returnType, boolean and) LiteralList(Literal<? extends T>[] literals, Class<T> returnType, boolean and, LiteralList<?> source) -
Method Summary
Modifier and TypeMethodDescription<R> Optional<? extends Expression<R>> convertExpression(Class<R> to) Converts this expression from it's current type (T) to another type, using converters.T[]Methods inherited from class ExpressionList
getArray, getExpressions, getReturnType, getSource, getValues, getValues, init, isAndList, isLoopOf, isSingle, iterator, setAndList, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Expression
acceptsChange, acceptsChange, acceptsChange, change, check, check, getArray, getReturnType, getSingle, getSource, isAndList, isLoopOf, isSingle, iterator, setAndList, streamMethods inherited from interface SyntaxElement
init, toString
-
Constructor Details
-
LiteralList
-
LiteralList
public LiteralList(Literal<? extends T>[] literals, Class<T> returnType, boolean and, LiteralList<?> source)
-
-
Method Details
-
getValues
-
getSingle
-
convertExpression
Description copied from interface:ExpressionConverts this expression from it's current type (T) to another type, using converters.- Specified by:
convertExpressionin interfaceExpression<T>- Overrides:
convertExpressionin classExpressionList<T>- Type Parameters:
R- the type to convert this Expression to- Parameters:
to- the class of the type to convert this Expression to- Returns:
- a converted Expression, or
nullif it couldn't be converted
-