|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.WrapperCollections.AbstractWrapperCollection
com.tangosol.util.WrapperCollections.AbstractWrapperList
com.tangosol.util.ImmutableMultiList.ListView
protected class ImmutableMultiList.ListView
ListView exposes the underlying ImmutableMultiList through the List
interface, maintaining correct equals() and hashCode() semantics
Constructor Summary | |
---|---|
protected |
ImmutableMultiList.ListView() Create a ListView over this ImmutableMultiList. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o) Compares the specified object with this list for equality. |
int |
hashCode() Returns the hash code value for this list. |
Methods inherited from class com.tangosol.util.WrapperCollections.AbstractWrapperList |
---|
add, addAll, get, getDelegate, indexOf, lastIndexOf, listIterator, listIterator, remove, set, subList |
Methods inherited from class com.tangosol.util.WrapperCollections.AbstractWrapperCollection |
---|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
Methods inherited from interface java.util.List |
---|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Constructor Detail |
---|
protected ImmutableMultiList.ListView()
Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class WrapperCollections.AbstractWrapperCollection
o
- the object to be compared for equality with this list.public int hashCode()
hashCode = 1; Iterator i = list.iterator(); while (i.hasNext()) { Object obj = i.next(); hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode()); }This ensures that list1.equals(list2) implies that list1.hashCode()==list2.hashCode() for any two lists, list1 and list2, as required by the general contract of Object.hashCode.
hashCode
in interface java.util.Collection
hashCode
in interface java.util.List
hashCode
in class WrapperCollections.AbstractWrapperCollection
Object.hashCode()
, Object.equals(Object)
, equals(Object)
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |