Module org.jhotdraw8.icollection
Class AbstractReadOnlyList<E>
java.lang.Object
org.jhotdraw8.icollection.readonly.AbstractReadOnlyCollection<E>
org.jhotdraw8.icollection.readonly.AbstractReadOnlyList<E>
- Type Parameters:
E- the element type
- All Implemented Interfaces:
Iterable<E>,ReadOnlyCollection<E>,ReadOnlyList<E>,ReadOnlySequencedCollection<E>
- Direct Known Subclasses:
ReadOnlyListFacade
public abstract class AbstractReadOnlyList<E>
extends AbstractReadOnlyCollection<E>
implements ReadOnlyList<E>
Abstract base class for
ReadOnlyLists.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.jhotdraw8.icollection.readonly.AbstractReadOnlyCollection
contains, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlyCollection
characteristics, contains, containsAll, isEmpty, size, stream, toArray, toArrayMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlyList
asList, get, getFirst, getLast, getLast, indexOf, iterator, lastIndexOf, listIterator, listIterator, peekFirst, peekLast, readOnlySubList, spliteratorMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySequencedCollection
asCollection, readOnlyReversed
-
Constructor Details
-
AbstractReadOnlyList
public AbstractReadOnlyList()Constructs a new instance.
-
-
Method Details
-
equals
Description copied from interface:ReadOnlyListCompares the specified object with this list for equality.Returns
trueif the given object is also a read-only list and the two lists contain the same elements in the same sequence.Implementations of this method should use
ReadOnlyList.listEquals(org.jhotdraw8.icollection.readonly.ReadOnlyList<E>, java.lang.Object).- Specified by:
equalsin interfaceReadOnlyList<E>- Overrides:
equalsin classObject- Parameters:
o- an object- Returns:
trueif the object is equal to this list
-
hashCode
public int hashCode()Description copied from interface:ReadOnlyListReturns the hash code value for this list. The hash code is the result of the calculation described inList.hashCode().Implementations of this method should use
ReadOnlyList.iteratorToHashCode(java.util.Iterator<E>).- Specified by:
hashCodein interfaceReadOnlyList<E>- Overrides:
hashCodein classObject- Returns:
- the hash code value for this set
-