|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IntCollection
This interface defines collections of int values.
Collection
Method Summary | |
---|---|
boolean |
add(int v)
Adds an element to this collection. |
boolean |
addAll(IntCollection c)
Adds all the elements of a specified collection to this collection. |
void |
clear()
Clears this collection. |
boolean |
contains(int v)
Indicates whether this collection contains a specified element. |
boolean |
containsAll(IntCollection c)
Indicates whether all elements of a specified collection is contained in this collection. |
boolean |
equals(java.lang.Object obj)
Indicates whether this collection is equal to some object. |
int |
hashCode()
Returns a hash code value for this collection. |
boolean |
isEmpty()
Indicates whether this collection is empty. |
IntIterator |
iterator()
Returns an iterator over this collection. |
boolean |
remove(int v)
Removes a specified element from this collection. |
boolean |
removeAll(IntCollection c)
Removes all the elements of a specified collection from this collection. |
boolean |
retainAll(IntCollection c)
Retains only the elements of a specified collection in this collection. |
int |
size()
Returns the number of elements in this collection. |
int[] |
toArray()
Returns the elements of this collection as an array. |
int[] |
toArray(int[] a)
Returns the elements of this collection as an array. |
void |
trimToSize()
Minimizes the memory used by this collection. |
Method Detail |
---|
boolean add(int v)
v
- the element to add to this collection.
java.lang.UnsupportedOperationException
- if the operation is not supported by this
collection.addAll(IntCollection)
boolean addAll(IntCollection c)
c
- the collection whose elements to add to this
collection.
java.lang.UnsupportedOperationException
- if the operation is not supported by this
collection.
java.lang.NullPointerException
- if c is null.add(int)
void clear()
java.lang.UnsupportedOperationException
- if the operation is not supported by this
collection.boolean contains(int v)
v
- the element to test for containment.
containsAll(IntCollection)
boolean containsAll(IntCollection c)
c
- the collection whose elements to test for
containment.
java.lang.NullPointerException
- if c is null.contains(int)
boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object with which to compare this collection.
int hashCode()
hashCode
in class java.lang.Object
boolean isEmpty()
IntIterator iterator()
boolean remove(int v)
v
- the int value to remove from this collection.
java.lang.UnsupportedOperationException
- if the operation is not supported by this
collection.boolean removeAll(IntCollection c)
c
- the collection whose elements to remove from this
collection.
java.lang.UnsupportedOperationException
- if the operation is not supported by this
collection.
java.lang.NullPointerException
- if c is null.boolean retainAll(IntCollection c)
c
- the collection whose elements to retain in this
collection.
java.lang.UnsupportedOperationException
- if the operation is not supported by this
collection.
java.lang.NullPointerException
- if c is null.int size()
int[] toArray()
int[] toArray(int[] a)
a
- an array to fill with the elements of this
collection; if a is null or not
big enough to contain all the elements of this
collection, an new array is allocated,
and a is not changed.
void trimToSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |