info.codesaway.util.regex
Enum Pattern.Comparison

java.lang.Object
  extended by java.lang.Enum<Pattern.Comparison>
      extended by info.codesaway.util.regex.Pattern.Comparison
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Pattern.Comparison>
Enclosing class:
Pattern

public static enum Pattern.Comparison
extends java.lang.Enum<Pattern.Comparison>


Enum Constant Summary
GREATER_THAN
           
GREATER_THAN_EQUAL
           
LESS_THAN
           
LESS_THAN_EQUAL
           
 
Field Summary
static boolean ALLOWS_EQUAL
           
static boolean MATCHES_ABOVE
           
static boolean MATCHES_BELOW
           
 
Method Summary
 boolean allowsEqual()
           
 boolean matchesAbove()
           
 boolean matchesBelow()
           
 Pattern.Comparison negate()
          Returns the Comparison with the reverse greater than / less than of this Comparison (keeps whether allows equal).
static Pattern.Comparison valueOf(boolean matchesBelow, boolean allowsEqual)
           
static Pattern.Comparison valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Pattern.Comparison[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LESS_THAN

public static final Pattern.Comparison LESS_THAN

LESS_THAN_EQUAL

public static final Pattern.Comparison LESS_THAN_EQUAL

GREATER_THAN

public static final Pattern.Comparison GREATER_THAN

GREATER_THAN_EQUAL

public static final Pattern.Comparison GREATER_THAN_EQUAL
Field Detail

MATCHES_BELOW

public static final boolean MATCHES_BELOW
See Also:
Constant Field Values

MATCHES_ABOVE

public static final boolean MATCHES_ABOVE
See Also:
Constant Field Values

ALLOWS_EQUAL

public static final boolean ALLOWS_EQUAL
See Also:
Constant Field Values
Method Detail

values

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

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

valueOf

public static Pattern.Comparison 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

matchesBelow

public boolean matchesBelow()

matchesAbove

public boolean matchesAbove()

allowsEqual

public boolean allowsEqual()

negate

public Pattern.Comparison negate()
Returns the Comparison with the reverse greater than / less than of this Comparison (keeps whether allows equal).

This is most commonly seen when changing the sign to account for a negative.

-x < y
 x > y
 
 -x > y
 x < -y
 
 -x <= y
 x >= y
 
 -x >= y
 x <= -y

Returns:
the Comparison which has the reverse of this Comparison's greater than / less than sign (keeps whether allows equal)

valueOf

public static Pattern.Comparison valueOf(boolean matchesBelow,
                                         boolean allowsEqual)