com.versionone
Class DB.Int

java.lang.Object
  extended by com.versionone.DB
      extended by com.versionone.DB.Int
Enclosing class:
DB

public static class DB.Int
extends DB

DB Class for Integers


Nested Class Summary
 
Nested classes/interfaces inherited from class com.versionone.DB
DB.BigInt, DB.Bit, DB.DateTime, DB.Int, DB.NullObject, DB.Real, DB.Str
 
Field Summary
 
Fields inherited from class com.versionone.DB
Null
 
Constructor Summary
DB.Int()
          Create a NULL integer
DB.Int(int value)
          Create from an int
DB.Int(java.lang.Object value)
          Supports creation from several types of obejct Object is | value set by calling String | Integer.valueOf(value) Number | value.intValue()

Anything else causes the value to be null

 
Method Summary
static boolean compare(DB.Int a, DB.Int b)
          Static method for comparing two Int values
 boolean equals(java.lang.Object obj)
          Compares this instance to another Int or Integer object
 java.lang.Integer getValue()
          If this instance is not null, return an Integer object otherwise return null
 int intValue()
          Return the int value of this object
 long longValue()
          Return the long value of this object
 
Methods inherited from class com.versionone.DB
hashCode, isNull, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DB.Int

public DB.Int()
Create a NULL integer


DB.Int

public DB.Int(int value)
Create from an int

Parameters:
value - - the desired value

DB.Int

public DB.Int(java.lang.Object value)
Supports creation from several types of obejct Object is | value set by calling String | Integer.valueOf(value) Number | value.intValue()

Anything else causes the value to be null

Parameters:
value - - Set value based on
Method Detail

getValue

public java.lang.Integer getValue()
If this instance is not null, return an Integer object otherwise return null

Specified by:
getValue in class DB
Returns:

compare

public static boolean compare(DB.Int a,
                              DB.Int b)
Static method for comparing two Int values

Parameters:
a - - Int value
b - - Int value
Returns:

equals

public boolean equals(java.lang.Object obj)
Compares this instance to another Int or Integer object

Specified by:
equals in class DB

intValue

public int intValue()
Return the int value of this object

Returns:
int value of this object
Throws:
java.lang.NullPointerException - if instance is null

longValue

public long longValue()
Return the long value of this object

Returns:
long value of this object
Throws:
java.lang.NullPointerException - if instance is null