Qizx/open API

net.axyana.qizxopen.util
Class IdSet

java.lang.Object
  extended bynet.axyana.qizxopen.util.IdSet
Direct Known Subclasses:
BitIdSet, DifferenceIdSet, IntersectionIdSet

public abstract class IdSet
extends java.lang.Object

An abstract set of identifiers (positive integers).


Constructor Summary
IdSet()
           
 
Method Summary
abstract  IdSet copy()
           
abstract  int getNext(int id)
          Iteration mechanism: returns the first id in the set that is greater or equal to argument.
 boolean intersects(IdSet that)
          returns true if the intersection of the two sets is not empty.
 boolean isEmpty()
           
abstract  boolean test(int id)
          Identifier containment test.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdSet

public IdSet()
Method Detail

test

public abstract boolean test(int id)
Identifier containment test.


getNext

public abstract int getNext(int id)
Iteration mechanism: returns the first id in the set that is greater or equal to argument.

Returns:
-1 if no next id.

isEmpty

public boolean isEmpty()

intersects

public boolean intersects(IdSet that)
returns true if the intersection of the two sets is not empty.


copy

public abstract IdSet copy()

© 2005 Axyana Software