|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.sort.IntRangeSet
public class IntRangeSet
Set of int values. This implementation of IntSet uses a sorted array of integer ranges.
Constructor Summary | |
---|---|
IntRangeSet()
Create an empty set |
|
IntRangeSet(IntRangeSet input)
Create one IntRangeSet as a copy of another |
Method Summary | |
---|---|
boolean |
add(int value)
Add an integer to the set |
void |
addRange(int low,
int high)
Add a range of integers to the set. |
void |
clear()
Clear the contents of the IntSet (making it an empty set) |
boolean |
contains(int value)
Determine whether a particular integer is present in the set |
boolean |
containsAll(IntSet other)
Test if this set is a superset of another set |
boolean |
equals(Object other)
Test whether this set has exactly the same members as another set. |
int[] |
getEndPoints()
Get the end points of the ranges |
int |
getNumberOfRanges()
Get the number of ranges actually in use |
int[] |
getStartPoints()
Get the start points of the ranges |
int |
hashCode()
Construct a hash key that supports the equals() test |
boolean |
isEmpty()
Determine if the set is empty |
IntIterator |
iterator()
Get an iterator over the values |
boolean |
remove(int value)
Remove an integer from the set |
int |
size()
Get the number of integers in the set |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntRangeSet()
public IntRangeSet(IntRangeSet input)
input
- the IntRangeSet to be copiedMethod Detail |
---|
public void clear()
IntSet
clear
in interface IntSet
public int size()
IntSet
size
in interface IntSet
public boolean isEmpty()
IntSet
isEmpty
in interface IntSet
public boolean contains(int value)
IntSet
contains
in interface IntSet
value
- the integer under test
public boolean remove(int value)
IntSet
remove
in interface IntSet
value
- the integer to be removed
public boolean add(int value)
add
in interface IntSet
value
- the integer to be added
public IntIterator iterator()
iterator
in interface IntSet
public String toString()
toString
in class Object
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public boolean containsAll(IntSet other)
containsAll
in interface IntSet
public void addRange(int low, int high)
low
- the low end of the new rangehigh
- the high end of the new rangepublic int[] getStartPoints()
public int[] getEndPoints()
public int getNumberOfRanges()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |