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

public interface Literal<T> extends Expression<T>
An expression whose value is known at parse time
  • Method Details

    • getValues

      T[] getValues()
    • getSingle

      default Optional<? extends T> getSingle()
    • getValues

      default T[] getValues(TriggerContext ctx)
      Description copied from interface: Expression
      Retrieves 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:
      getValues in interface Expression<T>
      Parameters:
      ctx - the event
      Returns:
      an array of the values
      See Also:
    • isLiteral

      static boolean isLiteral(Expression<?> exp)