public static class ShortCollections.UnmodifiableCollection extends Object implements ShortCollection, Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(short k) |
boolean |
add(Short k) |
boolean |
addAll(Collection<? extends Short> c) |
boolean |
addAll(ShortCollection c) |
void |
clear() |
boolean |
contains(Object k) |
boolean |
contains(short o) |
boolean |
containsAll(Collection<?> c) |
boolean |
containsAll(ShortCollection c) |
boolean |
isEmpty() |
ShortIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
rem(short k)
|
boolean |
remove(Object ok) |
boolean |
removeAll(Collection<?> c) |
boolean |
removeAll(ShortCollection c) |
boolean |
retainAll(Collection<?> c) |
boolean |
retainAll(ShortCollection c) |
ShortIterator |
shortIterator()
Deprecated.
|
int |
size() |
Object[] |
toArray() |
short[] |
toArray(short[] a)
Returns a primitive type array containing the items of this collection.
|
<T> T[] |
toArray(T[] a)
Returns an containing the items of this collection;
the runtime type of the returned array is that of the specified array.
|
short[] |
toShortArray()
Returns a primitive type array containing the items of this collection.
|
short[] |
toShortArray(short[] a)
Returns a primitive type array containing the items of this collection.
|
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCodepublic int size()
size in interface Collection<Short>public boolean isEmpty()
isEmpty in interface Collection<Short>public boolean contains(short o)
contains in interface ShortCollectionCollection.contains(Object)public ShortIterator iterator()
ShortCollectionNote that this specification strengthens the one given in
Iterable.iterator(), which was already
strengthened in the corresponding type-specific class,
but was weakened by the fact that this interface extends Collection.
iterator in interface ShortCollectioniterator in interface ShortIterableiterator in interface Iterable<Short>iterator in interface Collection<Short>@Deprecated public ShortIterator shortIterator()
ShortCollectionshortIterator in interface ShortCollectionShortCollection.iterator()public boolean add(short k)
add in interface ShortCollectionCollection.add(Object)public boolean remove(Object ok)
remove in interface Collection<Short>public boolean addAll(Collection<? extends Short> c)
addAll in interface Collection<Short>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<Short>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<Short>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<Short>public void clear()
clear in interface Collection<Short>public <T> T[] toArray(T[] a)
ShortCollectionWarning: Note that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toArray in interface ShortCollectiontoArray in interface Collection<Short>a - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public Object[] toArray()
toArray in interface Collection<Short>public short[] toShortArray()
ShortCollectiontoShortArray in interface ShortCollectionCollection.toArray()public short[] toShortArray(short[] a)
ShortCollectionNote that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toShortArray in interface ShortCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public short[] toArray(short[] a)
ShortCollectionNote that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toArray in interface ShortCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public boolean rem(short k)
ShortCollectionremove(), but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates
remove().rem in interface ShortCollectionCollection.remove(Object)public boolean addAll(ShortCollection c)
addAll in interface ShortCollectionCollection.addAll(Collection)public boolean containsAll(ShortCollection c)
containsAll in interface ShortCollectionCollection.containsAll(Collection)public boolean removeAll(ShortCollection c)
removeAll in interface ShortCollectionCollection.removeAll(Collection)public boolean retainAll(ShortCollection c)
retainAll in interface ShortCollectionCollection.retainAll(Collection)public boolean add(Short k)
add in interface Collection<Short>public boolean contains(Object k)
contains in interface Collection<Short>