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

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

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

This class contains all possible binary operators.


Enum Constant Summary
AND
          &&
ANY_ARROW_LONE
          ->lone
ANY_ARROW_ONE
          ->one
ANY_ARROW_SOME
          ->some
ARROW
          ->
DIV
          divide
DOMAIN
          <:
EQUALS
          =
GT
          >
GTE
          >=
IFF
          <=>
IMINUS
          int -
IMPLIES
          =>
IN
          in
INTERSECT
          &
IPLUS
          int +
ISSEQ_ARROW_LONE
          isSeq->lone
JOIN
          .
LONE_ARROW_ANY
          lone->
LONE_ARROW_LONE
          lone->lone
LONE_ARROW_ONE
          lone->one
LONE_ARROW_SOME
          lone->some
LT
          <
LTE
          =<
MINUS
          set diff
MUL
          multiply
NOT_EQUALS
          !=
NOT_GT
          !>
NOT_GTE
          !>=
NOT_IN
          !in
NOT_LT
          !<
NOT_LTE
          !=<
ONE_ARROW_ANY
          one->
ONE_ARROW_LONE
          one->lone
ONE_ARROW_ONE
          one->one
ONE_ARROW_SOME
          one->some
OR
          ||
PLUS
          set union
PLUSPLUS
          ++
RANGE
          :>
REM
          remainder
SHA
          >>
SHL
          <<
SHR
          >>>
SOME_ARROW_ANY
          some->
SOME_ARROW_LONE
          some->lone
SOME_ARROW_ONE
          some->one
SOME_ARROW_SOME
          some->some
 
Field Summary
 boolean isArrow
          True if and only if this operator is the Cartesian product "->", a "seq" multiplicity, or is a multiplicity arrow of the form "?->?".
 
Method Summary
 Expr make(Pos pos, Pos closingBracket, Expr left, Expr right)
          Constructs a new ExprBinary node.
 java.lang.String toHTML()
          Returns the human readable label already encoded for HTML
 java.lang.String toString()
          Returns the human readable label for this operator.
static ExprBinary.Op valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ExprBinary.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

ARROW

public static final ExprBinary.Op ARROW
->


ANY_ARROW_SOME

public static final ExprBinary.Op ANY_ARROW_SOME
->some


ANY_ARROW_ONE

public static final ExprBinary.Op ANY_ARROW_ONE
->one


ANY_ARROW_LONE

public static final ExprBinary.Op ANY_ARROW_LONE
->lone


SOME_ARROW_ANY

public static final ExprBinary.Op SOME_ARROW_ANY
some->


SOME_ARROW_SOME

public static final ExprBinary.Op SOME_ARROW_SOME
some->some


SOME_ARROW_ONE

public static final ExprBinary.Op SOME_ARROW_ONE
some->one


SOME_ARROW_LONE

public static final ExprBinary.Op SOME_ARROW_LONE
some->lone


ONE_ARROW_ANY

public static final ExprBinary.Op ONE_ARROW_ANY
one->


ONE_ARROW_SOME

public static final ExprBinary.Op ONE_ARROW_SOME
one->some


ONE_ARROW_ONE

public static final ExprBinary.Op ONE_ARROW_ONE
one->one


ONE_ARROW_LONE

public static final ExprBinary.Op ONE_ARROW_LONE
one->lone


LONE_ARROW_ANY

public static final ExprBinary.Op LONE_ARROW_ANY
lone->


LONE_ARROW_SOME

public static final ExprBinary.Op LONE_ARROW_SOME
lone->some


LONE_ARROW_ONE

public static final ExprBinary.Op LONE_ARROW_ONE
lone->one


LONE_ARROW_LONE

public static final ExprBinary.Op LONE_ARROW_LONE
lone->lone


ISSEQ_ARROW_LONE

public static final ExprBinary.Op ISSEQ_ARROW_LONE
isSeq->lone


JOIN

public static final ExprBinary.Op JOIN
.


DOMAIN

public static final ExprBinary.Op DOMAIN
<:


RANGE

public static final ExprBinary.Op RANGE
:>


INTERSECT

public static final ExprBinary.Op INTERSECT
&


PLUSPLUS

public static final ExprBinary.Op PLUSPLUS
++


PLUS

public static final ExprBinary.Op PLUS
set union


IPLUS

public static final ExprBinary.Op IPLUS
int +


MINUS

public static final ExprBinary.Op MINUS
set diff


IMINUS

public static final ExprBinary.Op IMINUS
int -


MUL

public static final ExprBinary.Op MUL
multiply


DIV

public static final ExprBinary.Op DIV
divide


REM

public static final ExprBinary.Op REM
remainder


EQUALS

public static final ExprBinary.Op EQUALS
=


NOT_EQUALS

public static final ExprBinary.Op NOT_EQUALS
!=


IMPLIES

public static final ExprBinary.Op IMPLIES
=>


LT

public static final ExprBinary.Op LT
<


LTE

public static final ExprBinary.Op LTE
=<


GT

public static final ExprBinary.Op GT
>


GTE

public static final ExprBinary.Op GTE
>=


NOT_LT

public static final ExprBinary.Op NOT_LT
!<


NOT_LTE

public static final ExprBinary.Op NOT_LTE
!=<


NOT_GT

public static final ExprBinary.Op NOT_GT
!>


NOT_GTE

public static final ExprBinary.Op NOT_GTE
!>=


SHL

public static final ExprBinary.Op SHL
<<


SHA

public static final ExprBinary.Op SHA
>>


SHR

public static final ExprBinary.Op SHR
>>>


IN

public static final ExprBinary.Op IN
in


NOT_IN

public static final ExprBinary.Op NOT_IN
!in


AND

public static final ExprBinary.Op AND
&&


OR

public static final ExprBinary.Op OR
||


IFF

public static final ExprBinary.Op IFF
<=>

Field Detail

isArrow

public final boolean isArrow
True if and only if this operator is the Cartesian product "->", a "seq" multiplicity, or is a multiplicity arrow of the form "?->?".

Method Detail

values

public static ExprBinary.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 (ExprBinary.Op c : ExprBinary.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 ExprBinary.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 Expr make(Pos pos,
                       Pos closingBracket,
                       Expr left,
                       Expr right)
Constructs a new ExprBinary node.

Parameters:
pos - - the original position in the source file (can be null if unknown)
left - - the left hand side expression
right - - the right hand side expression

toString

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

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

toHTML

public final java.lang.String toHTML()
Returns the human readable label already encoded for HTML