org.gxml.xs
Enum SmCompareKind

java.lang.Object
  extended by java.lang.Enum<SmCompareKind>
      extended by org.gxml.xs.SmCompareKind
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SmCompareKind>

public enum SmCompareKind
extends java.lang.Enum<SmCompareKind>

Enumeration representing possible results of comparisons.


Enum Constant Summary
AFTER
          compare(a,b) => AFTER iff a is after b in the ordering.
BEFORE
          compare(a,b) => BEFORE iff a is before b in the ordering.
EQUAL
          compare(a,b) => EQUAL iff a is equal to b in the ordering.
INDETERMINATE
          compare(a,b) => INDETERMINATE iff the ordering of a and b cannot be determined.
 
Method Summary
 boolean isDeterminate()
          Returns true if the ordering can be determined, otherwise false.
static SmCompareKind lookup(int signum)
          Converts a signum value into an enumeration value according to the following table: lookup signum BEFORE negative EQUAL zero (0) AFTER positive
 int signum()
          Returns an integer value according to the following table: SmCompareKind signum BEFORE -1 EQUAL 0 AFTER +1 INDETERMINATE throws AssertionError
static SmCompareKind valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SmCompareKind[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BEFORE

public static final SmCompareKind BEFORE
compare(a,b) => BEFORE iff a is before b in the ordering.


EQUAL

public static final SmCompareKind EQUAL
compare(a,b) => EQUAL iff a is equal to b in the ordering.


AFTER

public static final SmCompareKind AFTER
compare(a,b) => AFTER iff a is after b in the ordering.


INDETERMINATE

public static final SmCompareKind INDETERMINATE
compare(a,b) => INDETERMINATE iff the ordering of a and b cannot be determined.

Method Detail

values

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

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

valueOf

public static SmCompareKind 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

isDeterminate

public boolean isDeterminate()
Returns true if the ordering can be determined, otherwise false.
SmCompareKind isDeterminate()
BEFORE true
EQUAL true
AFTER true
INDETERMINATE false


signum

public int signum()
Returns an integer value according to the following table:
SmCompareKind signum
BEFORE -1
EQUAL 0
AFTER +1
INDETERMINATE throws AssertionError


lookup

public static SmCompareKind lookup(int signum)
Converts a signum value into an enumeration value according to the following table:
lookup signum
BEFORE negative
EQUAL zero (0)
AFTER positive



Copyright © 2009 TIBCO Software Inc. All Rights Reserved.