step
Class StepInt

java.lang.Object
  |
  +--java.lang.Number
        |
        +--step.StepInt
All Implemented Interfaces:
Serializable, StepObject

public class StepInt
extends Number
implements StepObject

Implementation of the built-in STEP int type.

See Also:
Serialized Form

Field Summary
static Type TYPE
          The STEP type for int objects.
 
Constructor Summary
StepInt(byte byteValue)
          Create a STEP int from a byte value.
StepInt(int intValue)
          Create a STEP int from a (Java) int value.
StepInt(long longValue)
          Create a STEP int from a long value.
StepInt(short shortValue)
          Create a STEP int from a short value.
 
Method Summary
 StepInt add(StepInt rhs)
          Add two STEP int values.
 byte byteValue()
          Convert this object to a byte value.
 StepInt div(StepInt rhs)
          Divide this value by another STEP int value.
 double doubleValue()
          Convert this object to a double value.
 boolean equals(Object o)
          Compare two STEP int values for equality.
 float floatValue()
          Convert this object to a float value.
 int hashCode()
          Get a hash code for this value.
 int intValue()
          Convert this object to a (Java) int value.
 long longValue()
          Convert this object to a long value.
 StepInt mod(StepInt rhs)
          Get the division remainder of this value divided by another STEP int value.
 StepInt mul(StepInt rhs)
          Multiply two STEP int values.
 void setValue(byte byteValue)
          Set the value for this STEP int from a byte value.
 void setValue(int intValue)
          Set the value for this STEP int from a (Java) int value.
 void setValue(long longValue)
          Set the value for this STEP int from a long value.
 void setValue(short shortValue)
          Set the value for this STEP int from a short value.
 short shortValue()
          Convert this object to a short value.
 StepInt sub(StepInt rhs)
          Subtract a STEP int value from this value.
 String toString()
          Get a text version of this value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final Type TYPE
The STEP type for int objects.

Constructor Detail

StepInt

public StepInt(byte byteValue)
Create a STEP int from a byte value.


StepInt

public StepInt(short shortValue)
Create a STEP int from a short value.


StepInt

public StepInt(int intValue)
Create a STEP int from a (Java) int value.


StepInt

public StepInt(long longValue)
Create a STEP int from a long value.

Method Detail

setValue

public void setValue(byte byteValue)
Set the value for this STEP int from a byte value.


setValue

public void setValue(short shortValue)
Set the value for this STEP int from a short value.


setValue

public void setValue(int intValue)
Set the value for this STEP int from a (Java) int value.


setValue

public void setValue(long longValue)
Set the value for this STEP int from a long value.


byteValue

public byte byteValue()
Convert this object to a byte value.

NOTE: Values outside the [-128..127] range are truncated.

Overrides:
byteValue in class Number

doubleValue

public double doubleValue()
Convert this object to a double value.

Specified by:
doubleValue in class Number

floatValue

public float floatValue()
Convert this object to a float value.

Specified by:
floatValue in class Number

intValue

public int intValue()
Convert this object to a (Java) int value.

NOTE: Values outside the [-2147483648..2147483647] range are truncated.

Specified by:
intValue in class Number

longValue

public long longValue()
Convert this object to a long value.

Specified by:
longValue in class Number

shortValue

public short shortValue()
Convert this object to a short value.

NOTE: Values outside the [-32768..32767] range are truncated.

Overrides:
shortValue in class Number

add

public StepInt add(StepInt rhs)
Add two STEP int values.

Throws:
NullPointerException - if the argument is null.

sub

public StepInt sub(StepInt rhs)
Subtract a STEP int value from this value.

Throws:
NullPointerException - if the argument is null.

mul

public StepInt mul(StepInt rhs)
Multiply two STEP int values.

Throws:
NullPointerException - if the argument is null.

div

public StepInt div(StepInt rhs)
Divide this value by another STEP int value.

Throws:
NullPointerException - if the argument is null.

mod

public StepInt mod(StepInt rhs)
Get the division remainder of this value divided by another STEP int value.

Throws:
NullPointerException - if the argument is null.

equals

public boolean equals(Object o)
Compare two STEP int values for equality.

Specified by:
equals in interface StepObject
Overrides:
equals in class Object

hashCode

public int hashCode()
Get a hash code for this value.

Specified by:
hashCode in interface StepObject
Overrides:
hashCode in class Object

toString

public String toString()
Get a text version of this value.

Overrides:
toString in class Object