org.ourgrid.common.executor
Class IntegerExecutorHandle

java.lang.Object
  extended by org.ourgrid.common.executor.IntegerExecutorHandle
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, ExecutorHandle

public class IntegerExecutorHandle
extends java.lang.Object
implements ExecutorHandle

This class implements the interface ExecutorHandle and is used to identify executions dispatched to intances of a native Executor class.

See Also:
Serialized Form

Constructor Summary
IntegerExecutorHandle(int valueInt)
          Constructs a new handle by using an int value.
IntegerExecutorHandle(java.lang.Integer value)
          Constructs a new handle based on an instance of Integer class.
 
Method Summary
 int compareTo(java.lang.Object otherHandle)
           
 boolean equals(java.lang.Object o)
           
 int getIntValue()
          This method provides a representation of this handle like an primitive int value.
 java.lang.Integer getValue()
          This method provides the value of this handle.
 java.lang.String toString()
          This method provides a String representation of this handle.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntegerExecutorHandle

public IntegerExecutorHandle(java.lang.Integer value)
Constructs a new handle based on an instance of Integer class.

Parameters:
value - An instance of Integer class.

IntegerExecutorHandle

public IntegerExecutorHandle(int valueInt)
Constructs a new handle by using an int value.

Parameters:
valueInt - A integer value to init the handle.
Method Detail

getValue

public java.lang.Integer getValue()
This method provides the value of this handle.

Returns:
An instance of Integer class that represents the handle value.

getIntValue

public int getIntValue()
This method provides a representation of this handle like an primitive int value.

Returns:
A primitive int value representation for this handle

toString

public java.lang.String toString()
This method provides a String representation of this handle.

Overrides:
toString in class java.lang.Object
Returns:
A string representation for this handle.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(java.lang.Object otherHandle)
              throws java.lang.ClassCastException
Specified by:
compareTo in interface java.lang.Comparable
Throws:
java.lang.ClassCastException
See Also:
Comparable.compareTo(java.lang.Object)