edu.mit.csail.sdg.alloy4compiler.ast
Enum ExprConstant.Op

java.lang.Object
  extended by java.lang.Enum<ExprConstant.Op>
      extended by edu.mit.csail.sdg.alloy4compiler.ast.ExprConstant.Op
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ExprConstant.Op>
Enclosing class:
ExprConstant

public static enum ExprConstant.Op
extends java.lang.Enum<ExprConstant.Op>

This class contains all possible constant types.


Enum Constant Summary
EMPTYNESS
          the emptyness relation whose type is UNIV
FALSE
          false
IDEN
          the builtin "iden" relation
MAX
          the maximum integer constant
MIN
          the minimum integer constant
NEXT
          the "next" relation between integers
NUMBER
          an integer constant
STRING
          a String constant
TRUE
          true
 
Method Summary
 ExprConstant make(Pos pos, int number)
          Makes an ExprConstant node
 ExprConstant make(Pos pos, java.lang.String string)
          Makes an ExprConstant node
 java.lang.String toString()
          Returns the human readable label for this operator.
static ExprConstant.Op valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ExprConstant.Op[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TRUE

public static final ExprConstant.Op TRUE
true


FALSE

public static final ExprConstant.Op FALSE
false


IDEN

public static final ExprConstant.Op IDEN
the builtin "iden" relation


MIN

public static final ExprConstant.Op MIN
the minimum integer constant


MAX

public static final ExprConstant.Op MAX
the maximum integer constant


NEXT

public static final ExprConstant.Op NEXT
the "next" relation between integers


EMPTYNESS

public static final ExprConstant.Op EMPTYNESS
the emptyness relation whose type is UNIV


STRING

public static final ExprConstant.Op STRING
a String constant


NUMBER

public static final ExprConstant.Op NUMBER
an integer constant

Method Detail

values

public static ExprConstant.Op[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ExprConstant.Op c : ExprConstant.Op.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ExprConstant.Op valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

make

public final ExprConstant make(Pos pos,
                               int number)
Makes an ExprConstant node

Parameters:
pos - - the original position in the source file (can be null if unknown)
number - - the number (this argument is ignored if op!=NUMBER)

make

public final ExprConstant make(Pos pos,
                               java.lang.String string)
Makes an ExprConstant node

Parameters:
pos - - the original position in the source file (can be null if unknown)
string - - the string (this argument is ignored if op!=STRING)

toString

public final java.lang.String toString()
Returns the human readable label for this operator.

Overrides:
toString in class java.lang.Enum<ExprConstant.Op>