Package com.gurock.smartinspect
Class Enum
- java.lang.Object
-
- com.gurock.smartinspect.Enum
-
- Direct Known Subclasses:
ClockResolution,ControlCommandType,FileRotate,GraphicId,Level,LogEntryType,PacketType,ProcessFlowType,SchedulerAction,SourceId,ViewerId,WatchType
public abstract class Enum extends Object
Represents the abstract representation of the Enum pattern. It is used as a base type for all classes in the SmartInspect Java library which represent an enumeration type. This class is fully thread-safe.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Indicates whether some other object is equal to this one.intgetIntValue()Returns the integer value of this enum.booleangreater(Enum en)Indicates whether the integer value of this Enum is greater than the integer value of some other Enum.booleangreaterEqual(Enum en)Indicates whether the integer value of this Enum is greater than or equal to the integer value of some other Enum.booleanless(Enum en)Indicates whether the integer value of this Enum is less than the integer value of some other Enum.booleanlessEqual(Enum en)Indicates whether the integer value of this Enum is less than or equal to the integer value of some other Enum.StringtoString()Overridden.
-
-
-
Constructor Detail
-
Enum
protected Enum(int value)
Overloaded. Creates and initializes an Enum instance without a name.- Parameters:
value- The integer value of the resulting Enum.
-
Enum
protected Enum(int value, String name)Overloaded. Creates and initializes an Enum instance with a name.- Parameters:
value- The integer value of the resulting Enumname- Specifies the name of this instance. Describes this Enum object
-
-
Method Detail
-
toString
public String toString()
Overridden. Creates and returns a string representation of this object.
-
getIntValue
public int getIntValue()
Returns the integer value of this enum.- Returns:
- The integer value of this enum. For a string representation of this Enum object, refer to the documentation of the toString method.
-
equals
public boolean equals(Object o)
Indicates whether some other object is equal to this one.This method returns true if the supplied Object is an Enum and has the same integer value as returned by the getIntValue() method of this object. If the supplied Object is not an Enum, this method calls the equals method of the parent class.
-
less
public boolean less(Enum en)
Indicates whether the integer value of this Enum is less than the integer value of some other Enum.- Parameters:
en- The enum to compare this enum with.- Returns:
- True if the integer value of this Enum is less than the integer value of the supplied Enum and false otherwise.
-
lessEqual
public boolean lessEqual(Enum en)
Indicates whether the integer value of this Enum is less than or equal to the integer value of some other Enum.- Parameters:
en- The enum to compare this enum with.- Returns:
- True if the integer value of this Enum is less than or equal to the integer value of the supplied Enum and false otherwise.
-
greater
public boolean greater(Enum en)
Indicates whether the integer value of this Enum is greater than the integer value of some other Enum.- Parameters:
en- The enum to compare this enum with.- Returns:
- True if the integer value of this Enum is greater than the integer value of the supplied Enum and false otherwise.
-
greaterEqual
public boolean greaterEqual(Enum en)
Indicates whether the integer value of this Enum is greater than or equal to the integer value of some other Enum.- Parameters:
en- The enum to compare this enum with.- Returns:
- True if the integer value of this Enum is greater than or equal to the integer value of the supplied Enum and false otherwise.
-
-