|
||||||||||
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
public abstract class AbstractIntSet
A skeletal implementation of the IntSet interface.
Method Summary | |
---|---|
IntSet |
clone()
Returns the result of calling super.clone(). |
boolean |
equals(java.lang.Object o)
Compares the specified object with this set for equality. |
int |
hashCode()
Returns the hash code value for this set. |
IntIterator |
iterator()
Returns an ascending iterator over all elements in this set. |
int |
max()
Returns the first element returned by this.iterator(Integer.MAX_VALUE, Integer.MIN_VALUE). |
int |
min()
Returns the first element returned by this.iterator(). |
java.lang.String |
toString()
Returns a string representation of this int set. |
Methods inherited from class kodkod.util.ints.AbstractIntCollection |
---|
add, addAll, clear, contains, containsAll, isEmpty, remove, 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 |
---|
add, addAll, ceil, clear, contains, containsAll, floor, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
public IntIterator iterator()
iterator
in interface IntCollection
iterator
in interface IntSet
public int min()
min
in interface IntSet
java.util.NoSuchElementException
- - no this.intspublic int max()
max
in interface IntSet
java.util.NoSuchElementException
- - no this.intspublic IntSet clone() throws java.lang.CloneNotSupportedException
clone
in interface IntSet
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- - this is not cloneableObject.clone()
public boolean equals(java.lang.Object o)
equals
in interface IntSet
equals
in class java.lang.Object
public int hashCode()
Ints.superFastHash(int[])
of the elements in the set,
taken in the ascending order of values.
This ensures that s1.equals(s2) implies that s1.hashCode()==s2.hashCode()
for any two IntSets s1 and s2, as required by the general contract of the Object.hashCode method.
hashCode
in interface IntSet
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |