Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.util
Class ConverterCollections.ConverterEntrySet

    java.lang.Object
      com.tangosol.util.Base
          com.tangosol.util.ConverterCollections.ConverterEntrySet

All Implemented Interfaces:
  java.io.Serializable, java.lang.Iterable, java.util.Collection, java.util.Set

Enclosing class:
  ConverterCollections

    public static class ConverterCollections.ConverterEntrySet

extends Base
implements java.util.Set, java.io.Serializable

A Converter Entry Set views an underlying Entry Set through a set of key and value Converters.

Nested Class Summary
`protected class` | `ConverterCollections.ConverterEntrySet.ConverterEntry` A Map Entry that lazily converts the key and value.
`protected class` | `ConverterCollections.ConverterEntrySet.ConverterIterator` A Map Entry Iterator that converts the key and value types.

Field Summary
`protected Converter` | `m_convKeyDown` The Converter used to pass keys down to the Entry Set.
`protected Converter` | `m_convKeyUp` The Converter used to view keys stored in the Entry Set.
`protected Converter` | `m_convValDown` The Converter used to pass values down to the Entry Set.
`protected Converter` | `m_convValUp` The Converter used to view values stored in the Entry Set.
`protected java.util.Collection` | `m_set` The underlying Entry Set (or Collection of Map Entry objects).

Constructor Summary
`ConverterCollections.ConverterEntrySet(java.util.Collection set, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown)` Constructor.

Method Summary
`boolean` | `add(java.lang.Object o)` Ensures that this Collection contains the specified element.
`boolean` | `addAll(java.util.Collection col)` Adds all of the elements in the specified Collection to this Collection (optional operation).
`void` | `clear()` Removes all of the elements from this Collection.
`boolean` | `contains(java.lang.Object o)` Returns true if this Collection contains the specified element.
`boolean` | `containsAll(java.util.Collection col)` Returns `true` if this Collection contains all of the elements in the specified Collection.
`boolean` | `equals(java.lang.Object o)` Compares the specified object with this collection for equality.
`Converter` | `getConverterKeyDown()` Return the Converter used to pass keys down to the underlying Entry Set.
`Converter` | `getConverterKeyUp()` Return the Converter used to view the underlying Entry Set's keys through.
`Converter` | `getConverterValueDown()` Return the Converter used to pass values down to the underlying Entry Set.
`Converter` | `getConverterValueUp()` Return the Converter used to view the underlying Entry Set's values through.
`java.util.Collection` | `getEntrySet()` Return the underlying Entry Set.
`protected java.util.Set` | `instantiateEntrySet(java.util.Collection col, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown)` Create a Converter Entry Set.
`boolean` | `isEmpty()` Returns `true` if this Collection contains no elements.
`java.util.Iterator` | `iterator()` Returns an Iterator over the elements contained in this Collection.
`boolean` | `remove(java.lang.Object o)` Removes a single instance of the specified element from this Collection, if it is present (optional operation).
`boolean` | `removeAll(java.util.Collection col)` Removes all this Collection's elements that are also contained in the specified Collection (optional operation).
`boolean` | `retainAll(java.util.Collection col)` Retains only the elements in this Collection that are contained in the specified Collection (optional operation).
`int` | `size()` Returns the number of elements in this Collection.
`java.lang.Object[]` | `toArray()` Returns an array containing all of the elements in this Collection.
`java.lang.Object[]` | `toArray(java.lang.Object[] ao)` Returns an array containing all of the elements in this Collection whose runtime type is that of the specified array.
`java.lang.String` | `toString()` Return a String description for this collection.
`protected java.util.Map.Entry` | `wrapEntry(java.util.Map.Entry entry)` Wrap an Entry from the Entry Set to make a Converter Entry.
`protected java.util.Iterator` | `wrapIterator(java.util.Iterator iter)` Wrap an Iterator from the Entry Set to make a Converter Iterator.

Methods inherited from interface java.util.Set
`hashCode`

Field Detail

### m_set

    protected java.util.Collection m_set

  The underlying Entry Set (or Collection of Map Entry objects).

### m_convKeyUp

    protected Converter m_convKeyUp

  The Converter used to view keys stored in the Entry Set.

### m_convKeyDown

    protected Converter m_convKeyDown

  The Converter used to pass keys down to the Entry Set.

### m_convValUp

    protected Converter m_convValUp

  The Converter used to view values stored in the Entry Set.

### m_convValDown

    protected Converter m_convValDown

  The Converter used to pass values down to the Entry Set.

Constructor Detail

### ConverterCollections.ConverterEntrySet

    public ConverterCollections.ConverterEntrySet(java.util.Collection set,
                                                  Converter convKeyUp,
                                                  Converter convKeyDown,
                                                  Converter convValUp,
                                                  Converter convValDown)

  Constructor.

  Parameters:
    `set` - the underlying Entry Set (or Collection of Map Entry objects)
    `convKeyUp` - the Converter to view the underlying Entry Set's keys through
    `convKeyDown` - the Converter to use to pass keys down to the underlying Entry Set
    `convValUp` - the Converter to view the underlying Entry Set's values through
    `convValDown` - the Converter to use to pass values down to the underlying Entry Set

Method Detail

### size

    public int size()

  Returns the number of elements in this Collection.

  Specified by:
    `size` in interface `java.util.Collection`
  Specified by:
    `size` in interface `java.util.Set`
  Returns:
    the number of elements in this Collection

### isEmpty

    public boolean isEmpty()

  Returns `true` if this Collection contains no elements.

  Specified by:
    `isEmpty` in interface `java.util.Collection`
  Specified by:
    `isEmpty` in interface `java.util.Set`
  Returns:
    `true` if this Collection contains no elements

### contains

    public boolean contains(java.lang.Object o)

  Returns true if this Collection contains the specified element. More formally, returns true if and only if this Collection contains at least one element `e` such that `(o==null ? e==null : o.equals(e))`.

  Specified by:
    `contains` in interface `java.util.Collection`
  Specified by:
    `contains` in interface `java.util.Set`
  Parameters:
    `o` - the object to search for in the Collection
  Returns:
    true if this Collection contains the specified object

### iterator

    public java.util.Iterator iterator()

  Returns an Iterator over the elements contained in this Collection.

  Specified by:
    `iterator` in interface `java.lang.Iterable`
  Specified by:
    `iterator` in interface `java.util.Collection`
  Specified by:
    `iterator` in interface `java.util.Set`
  Returns:
    an Iterator over the elements contained in this Collection

### toArray

    public java.lang.Object[] toArray()

  Returns an array containing all of the elements in this Collection. Obeys the general contract of Collection.toArray.

  Specified by:
    `toArray` in interface `java.util.Collection`
  Specified by:
    `toArray` in interface `java.util.Set`
  Returns:
    an array, whose component type is the class of objects that may be stored in the Collection containing all of the elements in this Collection

### toArray

    public java.lang.Object[] toArray(java.lang.Object[] ao)

  Returns an array containing all of the elements in this Collection whose runtime type is that of the specified array. Obeys the general contract of Collection.toArray.

  Specified by:
    `toArray` in interface `java.util.Collection`
  Specified by:
    `toArray` in interface `java.util.Set`
  Parameters:
    `ao` - the array into which the elements of this Collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose
  Returns:
    an array containing the elements of this Collection

### add

    public boolean add(java.lang.Object o)

  Ensures that this Collection contains the specified element.

  Specified by:
    `add` in interface `java.util.Collection`
  Specified by:
    `add` in interface `java.util.Set`
  Parameters:
    `o` - element whose presence in this Collection is to be ensured
  Returns:
    true if the Collection changed as a result of the call

### remove

    public boolean remove(java.lang.Object o)

  Removes a single instance of the specified element from this Collection, if it is present (optional operation). More formally, removes an element `e` such that `(o==null ? e==null : o.equals(e))`, if the Collection contains one or more such elements. Returns true if the Collection contained the specified element (or equivalently, if the Collection changed as a result of the call).

  Specified by:
    `remove` in interface `java.util.Collection`
  Specified by:
    `remove` in interface `java.util.Set`
  Parameters:
    `o` - element to be removed from this Collection, if present
  Returns:
    true if the Collection contained the specified element

### containsAll

    public boolean containsAll(java.util.Collection col)

  Returns `true` if this Collection contains all of the elements in the specified Collection.

  Specified by:
    `containsAll` in interface `java.util.Collection`
  Specified by:
    `containsAll` in interface `java.util.Set`
  Parameters:
    `col` - Collection to be checked for containment in this Collection
  Returns:
    `true` if this Collection contains all of the elements in the specified Collection

### addAll

    public boolean addAll(java.util.Collection col)

  Adds all of the elements in the specified Collection to this Collection (optional operation). The behavior of this operation is undefined if the specified Collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is this Collection, and this Collection is nonempty.)

  Specified by:
    `addAll` in interface `java.util.Collection`
  Specified by:
    `addAll` in interface `java.util.Set`
  Parameters:
    `col` - elements to be inserted into this Collection
  Returns:
    `true` if this Collection changed as a result of the call

### removeAll

    public boolean removeAll(java.util.Collection col)

  Removes all this Collection's elements that are also contained in the specified Collection (optional operation). After this call returns, this Collection will contain no elements in common with the specified Collection.

  Specified by:
    `removeAll` in interface `java.util.Collection`
  Specified by:
    `removeAll` in interface `java.util.Set`
  Parameters:
    `col` - elements to be removed from this Collection
  Returns:
    `true` if this Collection changed as a result of the call

### retainAll

    public boolean retainAll(java.util.Collection col)

  Retains only the elements in this Collection that are contained in the specified Collection (optional operation). In other words, removes from this Collection all of its elements that are not contained in the specified Collection.

  Specified by:
    `retainAll` in interface `java.util.Collection`
  Specified by:
    `retainAll` in interface `java.util.Set`
  Parameters:
    `col` - elements to be retained in this Collection
  Returns:
    `true` if this Collection changed as a result of the call

### clear

    public void clear()

  Removes all of the elements from this Collection.

  Specified by:
    `clear` in interface `java.util.Collection`
  Specified by:
    `clear` in interface `java.util.Set`

### 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`
  Parameters:
    `o` - Object to be compared for equality with this Collection
  Returns:
    `true` if the specified object is equal to this Collection

### toString

    public java.lang.String toString()

  Return a String description for this collection.

  Returns:
    a String description of the Collection

### instantiateEntrySet

    protected java.util.Set instantiateEntrySet(java.util.Collection col,
                                                Converter convKeyUp,
                                                Converter convKeyDown,
                                                Converter convValUp,
                                                Converter convValDown)

  Create a Converter Entry Set.

  Parameters:
    `col` - the underlying Collection of Map Entry objects
    `convKeyUp` - the Converter to view the underlying Map's Entry Set's keys through
    `convKeyDown` - the Converter to use to pass keys down to the underlying Map's Entry Set
    `convValUp` - the Converter to view the underlying Map's Entry Set's values through
    `convValDown` - the Converter to use to pass values down to the underlying Map's Entry Set
  Returns:
    a Converter Entry Set

### wrapEntry

    protected java.util.Map.Entry wrapEntry(java.util.Map.Entry entry)

  Wrap an Entry from the Entry Set to make a Converter Entry.

  Parameters:
    `entry` - a Map Entry to wrap
  Returns:
    a Map Entry that restricts its type

### wrapIterator

    protected java.util.Iterator wrapIterator(java.util.Iterator iter)

  Wrap an Iterator from the Entry Set to make a Converter Iterator.

  Parameters:
    `iter` - a Iterator to wrap
  Returns:
    a Converter Iterator

### getEntrySet

    public java.util.Collection getEntrySet()

  Return the underlying Entry Set.

  Returns:
    the underlying Entry Set

### getConverterKeyUp

    public Converter getConverterKeyUp()

  Return the Converter used to view the underlying Entry Set's keys through.

  Returns:
    the Converter from the underlying Entry Set's keys

### getConverterKeyDown

    public Converter getConverterKeyDown()

  Return the Converter used to pass keys down to the underlying Entry Set.

  Returns:
    the Converter to the underlying Entry Set's keys

### getConverterValueUp

    public Converter getConverterValueUp()

  Return the Converter used to view the underlying Entry Set's values through.

  Returns:
    the Converter from the underlying Entry Set's values

### getConverterValueDown

    public Converter getConverterValueDown()

  Return the Converter used to pass values down to the underlying Entry Set.

  Returns:
    the Converter to the underlying Entry Set's values

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.