org.opt4j.satdecoding
Enum Constraint.Operator

java.lang.Object
  extended by java.lang.Enum<Constraint.Operator>
      extended by org.opt4j.satdecoding.Constraint.Operator
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Constraint.Operator>
Enclosing class:
Constraint

public static enum Constraint.Operator
extends java.lang.Enum<Constraint.Operator>

The Constraint.Operators correspond to the Boolean operators <=,=,>=.


Enum Constant Summary
EQ
          Boolean operation =.
GE
          Boolean operation >=.
LE
          Boolean operation <=.
 
Method Summary
static Constraint.Operator getOperator(java.lang.String string)
          Converts a String to an operator.
 boolean isTrue(int lhs, int rhs)
          Returns true if lhs Constraint.Operator rhs is true.
 java.lang.String toString()
          Returns a String representation of this Constraint.Operator.
static Constraint.Operator valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Constraint.Operator[] 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

LE

public static final Constraint.Operator LE
Boolean operation <=.


EQ

public static final Constraint.Operator EQ
Boolean operation =.


GE

public static final Constraint.Operator GE
Boolean operation >=.

Method Detail

values

public static Constraint.Operator[] 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 (Constraint.Operator c : Constraint.Operator.values())
    System.out.println(c);

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

valueOf

public static Constraint.Operator 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

toString

public java.lang.String toString()
Returns a String representation of this Constraint.Operator.

Overrides:
toString in class java.lang.Enum<Constraint.Operator>
Returns:
a string representation of this operator

isTrue

public boolean isTrue(int lhs,
                      int rhs)
Returns true if lhs Constraint.Operator rhs is true.

Parameters:
lhs - the left hand side value
rhs - the right hand side value
Returns:
true if the operation is true for the two values

getOperator

public static Constraint.Operator getOperator(java.lang.String string)
Converts a String to an operator.

Parameters:
string - the string (<=,=,>=).
Returns:
the operator