Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.util
Class ConverterCollections.ConverterSet

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.ConverterCollections.ConverterCollection
          extended by com.tangosol.util.ConverterCollections.ConverterSet

All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.Set
Direct Known Subclasses:
ConverterCollections.ConverterSortedSet, WrapperSelector.KeySet
Enclosing class:
ConverterCollections

public static class ConverterCollections.ConverterSet
extends ConverterCollections.ConverterCollection
implements java.util.Set, java.io.Serializable

A Converter Set views an underlying Set through a Converter.


Field Summary

 

Fields inherited from class com.tangosol.util.ConverterCollections.ConverterCollection
m_col, m_convDown, m_convUp

 

Constructor Summary
ConverterCollections.ConverterSet(java.util.Set set, Converter convUp, Converter convDown)
          Constructor.

 

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

 

Methods inherited from class com.tangosol.util.ConverterCollections.ConverterCollection
add, addAll, clear, contains, containsAll, getCollection, getConverterDown, getConverterUp, instantiateCollection, instantiateIterator, invalidate, 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

ConverterCollections.ConverterSet

public ConverterCollections.ConverterSet(java.util.Set set,
                                         Converter convUp,
                                         Converter convDown)
Constructor.
Parameters:
set - the underlying Set
convUp - the Converter from the underlying Set
convDown - the Converter to the underlying Set

Method Detail

equals

public boolean equals(java.lang.Object o)
Compares the specified object with this collection for equality.

Obeys the general contract of Collection.equals.

Specified by:
equals in interface java.util.Collection
Specified by:
equals in interface java.util.Set
Overrides:
equals in class ConverterCollections.ConverterCollection
Parameters:
o - Object to be compared for equality with this Collection
Returns:
true if the specified object is equal to this Collection
See Also:
Object.equals(Object), Set.equals(Object), List.equals(Object)

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
Returns:
the hash code value for this set.
See Also:
Object.hashCode(), Object.equals(Object), Set.equals(Object)

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


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