com.oxygenxml.validate.nvdl
Class IntSet

java.lang.Object
  extended by com.oxygenxml.validate.nvdl.IntSet

 class IntSet
extends Object

Utility class. Stores a set of integers. The set is stored in an array and sorted.


Field Summary
private static int INIT_SIZE
          Initial size.
private  int len
          The number of stored values.
private  int[] v
          An int array with the values.
 
Constructor Summary
IntSet()
           
 
Method Summary
(package private)  void add(int n)
          Add a new value.
(package private)  void addAll(IntSet is)
          Adds all the values from another set - union.
(package private)  int get(int i)
          Get the ith value from the set.
(package private)  int size()
          Get the number of values in this set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INIT_SIZE

private static final int INIT_SIZE
Initial size.

See Also:
Constant Field Values

v

private int[] v
An int array with the values.


len

private int len
The number of stored values.

Constructor Detail

IntSet

IntSet()
Method Detail

add

void add(int n)
Add a new value.

Parameters:
n - The value to be added.

addAll

void addAll(IntSet is)
Adds all the values from another set - union.

Parameters:
is - The other integer set.

size

int size()
Get the number of values in this set.

Returns:

get

int get(int i)
Get the ith value from the set.

Parameters:
i - The index in the set, zero based.
Returns:
The value at position i.