|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkodkod.util.ints.AbstractIntCollection
kodkod.util.ints.AbstractIntSet
kodkod.util.ints.IntTreeSet
public final class IntTreeSet
An implementation of the IntTreeSet interface based on a balanced binary search tree.
ints: set int |
Constructor Summary | |
---|---|
IntTreeSet()
Constructs an empty int set. |
|
IntTreeSet(IntSet s)
Constructs a new int set containing the elements in the specified set. |
Method Summary | |
---|---|
boolean |
add(int i)
Adds the given integer to this set if not already present and returns true. |
int |
ceil(int i)
Returns the smallest element in this set that is greater than or equal to i. |
void |
clear()
Removes all elements from this set. |
IntTreeSet |
clone()
Returns a copy of this int tree set. |
boolean |
contains(int i)
Returns true if i is in this set. |
boolean |
containsAll(IntCollection other)
Returns true if this collection contains all of the elements in the specified collection. |
int |
floor(int i)
Returns the largest element in this set that is smaller than or equal to i. |
IntIterator |
iterator(int from,
int to)
Returns an iterator over the elements of this set that are in the closed range [from..to]. |
int |
max()
Returns the largest element in this set. |
int |
min()
Returns the smallest element in this set. |
boolean |
remove(int i)
Removes the given integer from this set if already present and returns true. |
int |
size()
Returns the number of elements in this collection. |
Methods inherited from class kodkod.util.ints.AbstractIntSet |
---|
equals, hashCode, iterator, toString |
Methods inherited from class kodkod.util.ints.AbstractIntCollection |
---|
addAll, isEmpty, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface kodkod.util.ints.IntSet |
---|
addAll, isEmpty, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public IntTreeSet()
no this.ints' |
public IntTreeSet(IntSet s)
java.lang.NullPointerException
- - s = nullthis.ints' = s.ints |
Method Detail |
---|
public IntIterator iterator(int from, int to)
iterator
in interface IntSet
IntSet.iterator(int,int)
public int size()
size
in interface IntCollection
size
in interface IntSet
IntSet.size()
public boolean contains(int i)
contains
in interface IntCollection
contains
in interface IntSet
contains
in class AbstractIntCollection
IntSet.contains(int)
public int min()
min
in interface IntSet
min
in class AbstractIntSet
java.util.NoSuchElementException
- - no this.intsIntSet.min()
public int max()
max
in interface IntSet
max
in class AbstractIntSet
java.util.NoSuchElementException
- - no this.intsIntSet.max()
public int floor(int i)
floor
in interface IntSet
IntSet.floor(int)
public int ceil(int i)
ceil
in interface IntSet
IntSet.ceil(int)
public boolean add(int i)
add
in interface IntCollection
add
in interface IntSet
add
in class AbstractIntCollection
IntSet.add(int)
this.ints' = this.ints + i |
public boolean remove(int i)
remove
in interface IntCollection
remove
in interface IntSet
remove
in class AbstractIntCollection
IntSet.remove(int)
this.ints' = this.ints - i |
public boolean containsAll(IntCollection other)
containsAll
in interface IntCollection
containsAll
in interface IntSet
containsAll
in class AbstractIntCollection
IntSet.containsAll(kodkod.util.ints.IntCollection)
public void clear()
clear
in interface IntCollection
clear
in interface IntSet
clear
in class AbstractIntCollection
IntCollection.clear()
no this.ints' |
public IntTreeSet clone()
clone
in interface IntSet
clone
in class AbstractIntSet
IntSet.clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |