|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkodkod.util.ints.AbstractIntCollection
public abstract class AbstractIntCollection
A skeletal implementation of the IntCollection interface.
Method Summary | |
---|---|
boolean |
add(int i)
Throws an UnsupportedOperationException. |
boolean |
addAll(IntCollection c)
Adds all of the elements in the specified collection to this collection. |
void |
clear()
This implementation iterates over this set, removing each element using the Iterator.remove operation. |
boolean |
contains(int i)
Iterates through this.ints and returns true if it finds i, otherwise returns false. |
boolean |
containsAll(IntCollection c)
Returns true if this collection contains all of the elements in the specified collection. |
boolean |
isEmpty()
Returns true if this collection has no elements; otherwise returns false. |
boolean |
remove(int i)
Iterates through the elements of this, removes i if it finds it and returns true. |
boolean |
removeAll(IntCollection c)
Removes all of this collection's elements that are also contained in the specified collection. |
boolean |
retainAll(IntCollection c)
Retains only the elements in this collection that are contained in the specified collection. |
int[] |
toArray()
Returns the result of calling toArray(int[]) with a freshly constructed array of length this.size(). |
int[] |
toArray(int[] array)
Copies the elements of this collection into the specified array, provided that it is large enough, and returns it. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface kodkod.util.ints.IntCollection |
---|
iterator, size |
Method Detail |
---|
public boolean isEmpty()
isEmpty
in interface IntCollection
IntSet.isEmpty()
public boolean contains(int i)
contains
in interface IntCollection
public boolean add(int i)
add
in interface IntCollection
java.lang.UnsupportedOperationException
public boolean remove(int i)
remove
in interface IntCollection
java.lang.UnsupportedOperationException
- - this.iterator() does not support removaliterates through the elements of this and removes i if it finds it |
public boolean containsAll(IntCollection c)
containsAll
in interface IntCollection
IntCollection.containsAll(kodkod.util.ints.IntCollection)
public boolean addAll(IntCollection c)
addAll
in interface IntCollection
IntCollection.addAll(kodkod.util.ints.IntCollection)
public boolean retainAll(IntCollection c)
retainAll
in interface IntCollection
IntCollection.retainAll(kodkod.util.ints.IntCollection)
public boolean removeAll(IntCollection c)
removeAll
in interface IntCollection
IntCollection.removeAll(kodkod.util.ints.IntCollection)
public void clear()
Note that this implementation will throw an UnsupportedOperationException if the iterator returned by this collection's iterator method does not implement the remove method and this collection is non-empty.
clear
in interface IntCollection
java.lang.UnsupportedOperationException
- if the clear method is
not supported by this collection.public int[] toArray()
toArray
in interface IntCollection
IntCollection.toArray()
public int[] toArray(int[] array)
toArray
in interface IntCollection
IntCollection.toArray(int[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |