edu.unh.sdb.common
Class StorageType

java.lang.Object
  extended by edu.unh.sdb.common.Type
      extended by edu.unh.sdb.common.StorageType

public class StorageType
extends Type

The StorageType class represents the various basic types that are native to Java. User defined types are ultimately defined in terms of storage types, since these are the units that are written and read from disk or other sources of raw data.


Field Summary
static int Boolean
           
static int Byte
           
static int Char
           
static int Double
           
static int Float
           
static int Int
           
static int Long
           
static int Record
           
static int Short
           
static int Undefined
           
static int Unsigned_Byte
           
static int Unsigned_Short
           
static int UnsignedByte
           
static int UnsignedShort
           
 
Fields inherited from class edu.unh.sdb.common.Type
name
 
Method Summary
static int byteSize(int type)
          Return the length in bytes of the "basic" StorageTypes.
static int getNumStorageTypes()
          Return the number of distinct StorageTypes.
static java.lang.String intToTypeString(int type)
          returns a String of the name of the type indicated by the argument.
static boolean isSimpleStorageType(int type)
          Returns true if the argument is a valid StorageType value, except for StorageType.Record.
static boolean isStorageType(int type)
          Returns true if the argument is a valid StorageType value, false otherwise.
static void main(java.lang.String[] args)
           
static java.lang.String name(int type)
          returns a String of the name of the type indicated by the argument.
 java.lang.String toString()
          Return this StorageType represented as a nicely formatted String.
static int typeStringtoInt(java.lang.String type)
          Returns a valid type constant if the String argument is a valid type string.
 
Methods inherited from class edu.unh.sdb.common.Type
equals, getName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Undefined

public static final int Undefined
See Also:
Constant Field Values

Boolean

public static final int Boolean
See Also:
Constant Field Values

Byte

public static final int Byte
See Also:
Constant Field Values

Unsigned_Byte

public static final int Unsigned_Byte
See Also:
Constant Field Values

UnsignedByte

public static final int UnsignedByte
See Also:
Constant Field Values

Char

public static final int Char
See Also:
Constant Field Values

Short

public static final int Short
See Also:
Constant Field Values

Unsigned_Short

public static final int Unsigned_Short
See Also:
Constant Field Values

UnsignedShort

public static final int UnsignedShort
See Also:
Constant Field Values

Int

public static final int Int
See Also:
Constant Field Values

Float

public static final int Float
See Also:
Constant Field Values

Double

public static final int Double
See Also:
Constant Field Values

Long

public static final int Long
See Also:
Constant Field Values

Record

public static final int Record
See Also:
Constant Field Values
Method Detail

typeStringtoInt

public static int typeStringtoInt(java.lang.String type)
Returns a valid type constant if the String argument is a valid type string. Otherwise, returns 0.


intToTypeString

public static final java.lang.String intToTypeString(int type)
returns a String of the name of the type indicated by the argument.


name

public static java.lang.String name(int type)
returns a String of the name of the type indicated by the argument.


isStorageType

public static final boolean isStorageType(int type)
Returns true if the argument is a valid StorageType value, false otherwise.


isSimpleStorageType

public static final boolean isSimpleStorageType(int type)
Returns true if the argument is a valid StorageType value, except for StorageType.Record. For this value and any non-StorageType value this method returns false.


toString

public java.lang.String toString()
Return this StorageType represented as a nicely formatted String.

Overrides:
toString in class Type

getNumStorageTypes

public static final int getNumStorageTypes()
Return the number of distinct StorageTypes.


byteSize

public static int byteSize(int type)
Return the length in bytes of the "basic" StorageTypes. The length of StorageType.Record and all other types is returned as 0.


main

public static void main(java.lang.String[] args)