All Implemented Interfaces:
ShortCollection
All Known Implementing Classes:
InvocationCounter, RandomAccessShortList, AbstractListShortList, ArrayUnsignedByteList, NonSerializableListShortList, NonSerializableUnmodifiableShortList, BaseUnmodifiableShortList, ListShortList, RandomAccessShortSubList, BaseProxyShortList, ArrayShortList, AbstractRandomAccessShortListImpl, UnmodifiableShortList
short values.Commons - Primitives 1.0$ - Revision: 1.3 $ $Date: 2003/10/16 20:49:36 $Rodney - Waldhoff| Method from org.apache.commons.collections.primitives.ShortList Summary: |
|---|
| add, add, addAll, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeElementAt, set, subList |
| Method from org.apache.commons.collections.primitives.ShortList Detail: |
|---|
true
iff I changed as a result of this call.
If a collection refuses to add the specified
element for any reason other than that it already contains
the element, it must throw an exception (rather than
simply returning false). This preserves the invariant
that a collection always contains the specified element after
this call returns. |
|
|
true iff that is an ShortList
that contains the same elements in the same order as me.
In other words, returns true iff that is
an ShortList that has the same size as me,
and for which the elements returned by its
iterator are equal (==) to
the corresponding elements within me.
(This contract ensures that this method works properly across
different implementations of the ShortList interface.) |
|
ShortList is defined to be the
result of the following calculation:
int hash = 1;
for(ShortIterator iter = iterator(); iter.hasNext(); ) {
short value = iter.next();
hash = 31*hash + (int)(value ^ (value >>> 32));
}
This contract ensures that this method is consistent with
equals and with the
hashCode
method of a List of Short s. |
-1 if I do not contain
the element. |
|
|
|
|
|
|
ShortList
is backed by me, so that any changes in
the returned list are reflected in me, and vice-versa.
The returned list supports all of the optional operations
that I support.
Note that when fromIndex == toIndex,
the returned list is initially empty, and when
fromIndex == 0 && toIndex == size()
the returned list is my "improper" sublist, containing all my elements.
The semantics of the returned list become undefined
if I am structurally modified in any way other than
via the returned list. |