public interface ShortSet extends ShortCollection, Set<Short>
Set
specialization with short
elements.
Methods, declared in this interface (i. e. not inherited from the superinterfaces), are present only to remove some compile-time ambiguities, they don't have any additional meaning over the specifications from superinterfaces.
ShortSetFactory
,
@KolobokeSet
Modifier and Type | Method and Description |
---|---|
boolean |
add(Short e)
Deprecated.
Use specialization
ShortCollection.add(short) instead |
ShortIterator |
iterator()
Deprecated.
Instead of explicit
iterator() calls, use ShortCollection.cursor() ;
iterator() is still sensible only as a backing mechanism for Java 5's for-each
statements. |
add, contains, contains, cursor, forEach, forEachWhile, remove, removeIf, removeShort, toArray, toArray, toArray, toShortArray
clear, ensureCapacity, isEmpty, shrink, size, sizeAsLong
@Deprecated boolean add(@Nonnull Short e)
ShortCollection.add(short)
insteadCollections that support this operation may place limitations on what elements may be added to this collection. In particular, some collections will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. Collection classes should clearly specify in their documentation any restrictions on what elements may be added.
If a collection refuses to add a particular element for any reason other than that it already contains the element, it must throw an exception (rather than returning false). This preserves the invariant that a collection always contains the specified element after this call returns.
add
in interface Collection<Short>
add
in interface Set<Short>
add
in interface ShortCollection
e
- element whose presence in this collection is to be ensured@Deprecated @Nonnull ShortIterator iterator()
iterator()
calls, use ShortCollection.cursor()
;
iterator()
is still sensible only as a backing mechanism for Java 5's for-each
statements.iterator
in interface Collection<Short>
iterator
in interface Iterable<Short>
iterator
in interface Set<Short>
iterator
in interface ShortCollection