|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.expr.sort.AbstractIntSet
net.sf.saxon.expr.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(int[] startPoints,
int[] endPoints)
Create an IntRangeSet given the start points and end points of the integer ranges. |
|
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 |
IntSet |
copy()
Create a copy of this IntSet that leaves the original unchanged. |
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 |
IntSet |
mutableCopy()
Create a copy of this IntSet that contains the same set of integers. |
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 net.sf.saxon.expr.sort.AbstractIntSet |
|---|
containsAll, except, intersect, union |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.saxon.expr.sort.IntSet |
|---|
containsAll, except, intersect, union |
| Constructor Detail |
|---|
public IntRangeSet()
public IntRangeSet(IntRangeSet input)
input - the IntRangeSet to be copied
public IntRangeSet(int[] startPoints,
int[] endPoints)
startPoints - the start points of the integer rangesendPoints - the end points of the integer ranges
IllegalArgumentException - if the two arrays are different lengths. Other error conditions
in the input are not currently detected.| Method Detail |
|---|
public void clear()
IntSet
clear in interface IntSetpublic IntSet copy()
IntSet
copy in interface IntSetpublic IntSet mutableCopy()
IntSet
mutableCopy in interface IntSetpublic int size()
IntSet
size in interface IntSetpublic boolean isEmpty()
IntSet
isEmpty in interface IntSetpublic boolean contains(int value)
IntSet
contains in interface IntSetvalue - the integer under test
public boolean remove(int value)
IntSet
remove in interface IntSetvalue - the integer to be removed
public boolean add(int value)
add in interface IntSetvalue - the integer to be added
public IntIterator iterator()
iterator in interface IntSetpublic String toString()
toString in class Objectpublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Object
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 | ||||||||