|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IntSet
A set that holds integers and provides accessors that eliminate the
need to create and manipulate superfluous Integer
objects. It extends the Set interface and therefore
provides all of the standard methods (in which Integer
objects will be converted to ints).
| Method Summary | |
|---|---|
boolean |
add(int value)
Adds the specified element to this set if it is not already present (optional operation). |
boolean |
contains(int value)
Returns true if this set contains the specified element. |
Interator |
interator()
Return an Interator that iterates over the ints in this set. |
boolean |
remove(int value)
Removes the specified element from this set if it is present (optional operation). |
int[] |
toIntArray()
Returns an array containing all of the elements in this set. |
| Methods inherited from interface java.util.Set |
|---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Method Detail |
|---|
boolean contains(int value)
value - element whose presence in this set is to be tested.
boolean add(int value)
value - element to be added to this set.
UnsupportedOperationException - if the add method is
not supported by this set.boolean remove(int value)
value - element to be removed from this set, if present.
UnsupportedOperationException - if the remove method
is not supported by this set.Interator interator()
interator in interface Interableint[] toIntArray()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||