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

Variable Index

 o byteSize
 o id

Constructor Index

 o Id()
Construct an Id from nothing, initialise the Id to zero.
 o Id(byte[])
Construct an Id from a byte array
 o Id(int)
Construct an Id from an integer The initial value of the Id is taken from the integer
 o 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.
 o Id(String)
Construct an Id from a string.

Method Index

 o cloneMe()
Return a duplicate of the object
 o equals(Object)
Equality test, is this Id eqal to another? compare byte images
 o fromBytes(byte[])
Construct an Id from a byte array
 o hashCode()
Hashcode generator
 o image()
Return an image of the id as a string
 o increment()
Increment an Id (this is for counters)
 o toBytes()
Convert this Id to a byte array
 o toString()
Convert this Id to a String

Variables

 o id
  public int id
 o byteSize
  public final static int byteSize

Constructors

 o 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.

 o Id
  public Id(int id)
Construct an Id from an integer The initial value of the Id is taken from the integer

 o Id
  public Id(String s)
Construct an Id from a string.

 o Id
  public Id()
Construct an Id from nothing, initialise the Id to zero. Should we deprecate this?

 o Id
  public Id(byte b[])
Construct an Id from a byte array

Methods

 o fromBytes
  public Id fromBytes(byte b[])
Construct an Id from a byte array

 o hashCode
  public int hashCode()
Hashcode generator

Overrides:
hashCode in class Object
 o equals
  public boolean equals(Object obj)
Equality test, is this Id eqal to another? compare byte images

Overrides:
equals in class Object
 o image
  public String image()
Return an image of the id as a string

 o cloneMe
  public Id cloneMe()
Return a duplicate of the object

 o toString
  public String toString()
Convert this Id to a String

Overrides:
toString in class Object
 o increment
  public void increment()
Increment an Id (this is for counters)

 o toBytes
  public byte[] toBytes()
Convert this Id to a byte array


All Packages  Class Hierarchy  This Package  Previous  Next  Index