All Packages Class Hierarchy This Package Previous Next Index
Class cube.database.Id
java.lang.Object
|
+----cube.database.Id
- public class Id
- extends Object
This class encapsulates an Id in a Database
An Id is a compact 'key' data type for columns in a database.
For more information on the cube see the cube
Overview.
Copyright © 1997 Curtis E. Dyreson. All rights reserved.
Please be aware of the
Licence
and
Version.
- See Also:
- Table, Tuple
-
byteSize
-
-
id
-
-
Id()
- Construct an Id from nothing, initialise the Id to zero.
-
Id(byte[])
- Construct an Id from a byte array
-
Id(int)
- Construct an Id from an integer
The initial value of the Id is taken from the integer
-
Id(int[])
- Construct an Id from an array of integers
An Id is just a list of integers, currently a list of size 1,
so we are limited to 2^32-1 Ids.
-
Id(String)
- Construct an Id from a string.
-
cloneMe()
- Return a duplicate of the object
-
equals(Object)
- Equality test, is this Id eqal to another?
compare byte images
-
fromBytes(byte[])
- Construct an Id from a byte array
-
hashCode()
- Hashcode generator
-
image()
- Return an image of the id as a string
-
increment()
- Increment an Id (this is for counters)
-
toBytes()
- Convert this Id to a byte array
-
toString()
- Convert this Id to a String
id
public int id
byteSize
public final static int byteSize
Id
public Id(int id[])
- Construct an Id from an array of integers
An Id is just a list of integers, currently a list of size 1,
so we are limited to 2^32-1 Ids. Id can be reimplemented
using the BigInteger class to get more Ids.
Id
public Id(int id)
- Construct an Id from an integer
The initial value of the Id is taken from the integer
Id
public Id(String s)
- Construct an Id from a string.
Id
public Id()
- Construct an Id from nothing, initialise the Id to zero.
Should we deprecate this?
Id
public Id(byte b[])
- Construct an Id from a byte array
fromBytes
public Id fromBytes(byte b[])
- Construct an Id from a byte array
hashCode
public int hashCode()
- Hashcode generator
- Overrides:
- hashCode in class Object
equals
public boolean equals(Object obj)
- Equality test, is this Id eqal to another?
compare byte images
- Overrides:
- equals in class Object
image
public String image()
- Return an image of the id as a string
cloneMe
public Id cloneMe()
- Return a duplicate of the object
toString
public String toString()
- Convert this Id to a String
- Overrides:
- toString in class Object
increment
public void increment()
- Increment an Id (this is for counters)
toBytes
public byte[] toBytes()
- Convert this Id to a byte array
All Packages Class Hierarchy This Package Previous Next Index