All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cube.database.IdSet

java.lang.Object
   |
   +----cube.database.IdSet

public class IdSet
extends Object
An IdSet is a set of Ids. It is implemented using a Hashtable. An IdSet is a data type for columns in a database. An IdSet cannot be used as a key.

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

Constructor Index

 o IdSet()
Create an empty set
 o IdSet(byte[])
Create a set from a byte image of the set
 o IdSet(Id[])
Create a set from an array of Ids
 o IdSet(IdList)
Create a set from the list

Method Index

 o delete(Id)
Delete an Id from this set, does nothing if element does not exist
 o enumerate()
Return an enumeration of the elements (keys) in the set.
 o image()
image creates a formatted string of all the elements in the set
 o insert(Id)
Insert an element into this set
 o intersect(IdSet)
Create a new set that is the result of taking the intersection of this with another Set
 o memberOf(Id)
Is the given Id a member of the set?
 o numberOfElements()
How many elements are in this set?
 o toBytes()
Convert the set to a byte array
 o toIdArray()
Convert the set to an array of Ids (should this be an IdList?)
 o union(IdSet)
Create a new set that is the union of this set and another.
 o unionSelf(IdSet)
Add the elements in another set to this one

Constructors

 o IdSet
  public IdSet()
Create an empty set

 o IdSet
  public IdSet(byte b[])
Create a set from a byte image of the set

Parameters:
b - - the byte image of the set
 o IdSet
  public IdSet(IdList v)
Create a set from the list

Parameters:
v - - a list of Ids
 o IdSet
  public IdSet(Id v[])
Create a set from an array of Ids

Parameters:
v - - the array of Ids

Methods

 o numberOfElements
  public int numberOfElements()
How many elements are in this set?

 o memberOf
  public boolean memberOf(Id v)
Is the given Id a member of the set?

 o delete
  public void delete(Id v)
Delete an Id from this set, does nothing if element does not exist

Parameters:
v - - element to remove
 o insert
  public void insert(Id v)
Insert an element into this set

Parameters:
v - - element to insert
 o enumerate
  public Enumeration enumerate()
Return an enumeration of the elements (keys) in the set.

 o union
  public IdSet union(IdSet other)
Create a new set that is the union of this set and another.

Parameters:
other - - the other set
 o unionSelf
  public void unionSelf(IdSet other)
Add the elements in another set to this one

Parameters:
other - - the other set
 o image
  public String image()
image creates a formatted string of all the elements in the set

 o intersect
  public IdSet intersect(IdSet other)
Create a new set that is the result of taking the intersection of this with another Set

Parameters:
other - - the other set
 o toBytes
  public byte[] toBytes()
Convert the set to a byte array

 o toIdArray
  public Id[] toIdArray()
Convert the set to an array of Ids (should this be an IdList?)


All Packages  Class Hierarchy  This Package  Previous  Next  Index