Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.util
Class ImmutableMultiList.SetView

java.lang.Object
  extended by com.oracle.common.collections.WrapperCollections.AbstractWrapperCollection
      extended by com.oracle.common.collections.WrapperCollections.AbstractWrapperSet
          extended by com.tangosol.util.ImmutableMultiList.SetView

All Implemented Interfaces:
java.lang.Iterable, java.util.Collection, java.util.Set
Enclosing class:
ImmutableMultiList

protected class ImmutableMultiList.SetView
extends com.oracle.common.collections.WrapperCollections.AbstractWrapperSet

SetView exposes the underlying ImmutableMultiList through the Set interface, maintaining correct equals() and hashCode() semantics


Constructor Summary
protected ImmutableMultiList.SetView()
          Create a SetView over this ImmutableMultiList.

 

Method Summary
 boolean equals(java.lang.Object o)
          Compares the specified object with this set for equality.
 int hashCode()
          Returns the hash code value for this set.

 

Methods inherited from class com.oracle.common.collections.WrapperCollections.AbstractWrapperSet
getDelegate

 

Methods inherited from class com.oracle.common.collections.WrapperCollections.AbstractWrapperCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString

 

Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray

 

Constructor Detail

ImmutableMultiList.SetView

protected ImmutableMultiList.SetView()
Create a SetView over this ImmutableMultiList.

Method Detail

equals

public boolean equals(java.lang.Object o)
Compares the specified object with this set for equality. Returns true if the specified object is also a set, the two sets have the same size, and every member of the specified set is contained in this set (or equivalently, every member of this set is contained in the specified set). This definition ensures that the equals method works properly across different implementations of the set interface.
Specified by:
equals in interface java.util.Collection
Specified by:
equals in interface java.util.Set
Overrides:
equals in class com.oracle.common.collections.WrapperCollections.AbstractWrapperCollection
Parameters:
o - Object to be compared for equality with this set.
Returns:
true if the specified Object is equal to this set.

hashCode

public int hashCode()
Returns the hash code value for this set. The hash code of a set is defined to be the sum of the hash codes of the elements in the set, where the hashcode of a null element is defined to be zero. This ensures that s1.equals(s2) implies that s1.hashCode()==s2.hashCode() for any two sets s1 and s2, as required by the general contract of the Object.hashCode method.
Specified by:
hashCode in interface java.util.Collection
Specified by:
hashCode in interface java.util.Set
Overrides:
hashCode in class com.oracle.common.collections.WrapperCollections.AbstractWrapperCollection
Returns:
the hash code value for this set.
See Also:
Object.hashCode(), Object.equals(Object), Set.equals(Object)

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.