Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.util
Class ConverterCollections

java.lang.Object
  extended by com.oracle.common.collections.ConverterCollections
      extended by com.tangosol.util.ConverterCollections


public abstract class ConverterCollections
extends com.oracle.common.collections.ConverterCollections

A collection of Collection implementation classes that use the Converter interface to convert the items stored in underlying collection objects.

Author:
cp 2002.02.08, jh 2007.09.28

Nested Class Summary
static class ConverterCollections.ConverterCacheEntry
          A ConfigurableCacheMap.Entry that lazily converts the key and value.
static class ConverterCollections.ConverterCacheEvent
          A Converter CacheEvent views an underlying CacheEvent through a set of key and value Converters.
static class ConverterCollections.ConverterCacheMap
          A Converter CacheMap views an underlying CacheMap through a set of key and value Converters.
static class ConverterCollections.ConverterCollection
          Deprecated. As of Coherence 12.1.2, replaced by ConverterCollections.ConverterCollection
static class ConverterCollections.ConverterConcurrentMap
          A Converter ConcurrentMap views an underlying ConcurrentMap through a set of key and value Converters.
static class ConverterCollections.ConverterEntry
          Deprecated. 
static class ConverterCollections.ConverterEntrySet
          Deprecated. 
static class ConverterCollections.ConverterInvocableMap
          A Converter InvocableMap views an underlying InvocableMap through a set of key and value Converters.
static class ConverterCollections.ConverterList
          Deprecated. As of Coherence 12.1.2, replaced by ConverterCollections.ConverterList
static class ConverterCollections.ConverterListIterator
          Deprecated. As of Coherence 12.1.2, replaced by ConverterCollections.ConverterListIterator
static class ConverterCollections.ConverterMap
          Deprecated. As of Coherence 12.1.2, replaced by ConverterCollections.ConverterMap
static class ConverterCollections.ConverterMapEvent
          A ConverterMapEvent views an underlying MapEvent through a set of key and value Converters.
static class ConverterCollections.ConverterMapListener
          A converter MapListener that converts events of the underlying MapListener for the underlying map.
static class ConverterCollections.ConverterNamedCache
          A Converter NamedCache views an underlying NamedCache through a set of key and value Converters.
static class ConverterCollections.ConverterObservableMap
          A Converter ObservableMap views an underlying ObservableMap through a set of key and value Converters.
static class ConverterCollections.ConverterQueryMap
          A Converter QueryMap views an underlying QueryMap through a set of key and value Converters.
static class ConverterCollections.ConverterSet
          Deprecated. As of Coherence 12.1.2, replaced by ConverterCollections.ConverterSet
static class ConverterCollections.ConverterSortedMap
          Deprecated. As of Coherence 12.1.2, replaced by ConverterCollections.ConverterSortedMap
static class ConverterCollections.ConverterSortedSet
          Deprecated. As of Coherence 12.1.2, replaced by ConverterCollections.ConverterSortedSet

 

Nested classes/interfaces inherited from class com.oracle.common.collections.ConverterCollections
com.oracle.common.collections.ConverterCollections.AbstractConverterEntry, com.oracle.common.collections.ConverterCollections.ConverterComparator, com.oracle.common.collections.ConverterCollections.ConverterEnumerator

 

Constructor Summary
ConverterCollections()
           

 

Method Summary
static java.lang.Object[] convertArray(java.lang.Object[] ao, Converter conv)
          Convert the contents of the passed array.
static java.lang.Object[] convertArray(java.lang.Object[] aoSrc, Converter conv, java.lang.Object[] aoDest)
          Convert the contents of the passed source array into an array with the component type of the passed destination array, using the destination array itself if it is large enough, and placing a null in the first unused element of the destination array if it is larger than the source array.
static ConverterCollections.ConverterCacheMap getCacheMap(CacheMap map, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown)
          Returns a Converter instance of CacheMap.
static ConverterCollections.ConverterConcurrentMap getConcurrentMap(ConcurrentMap map, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown)
          Returns a Converter instance of ConcurrentMap.
static ConverterCollections.ConverterInvocableMap getInvocableMap(InvocableMap map, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown)
          Returns a Converter instance of InvocableMap.
static MapEvent getMapEvent(ObservableMap map, MapEvent event, Converter convKey, Converter convVal)
          Returns an instance of a MapEvent that uses Converters to retrieve the event's data.
static MapEvent getMapEvent(ObservableMap map, MapEvent event, Converter convKey, Converter convVal, BackingMapManagerContext context)
          Returns an instance of a MapEvent that uses Converters to retrieve the event's data, and additionally provides access to the BackingMapManagerContext.
static ConverterCollections.ConverterNamedCache getNamedCache(NamedCache cache, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown)
          Returns a Converter instance of NamedCache.
static ConverterCollections.ConverterObservableMap getObservableMap(ObservableMap map, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown)
          Returns a Converter instance of ObservableMap.
static ConverterCollections.ConverterQueryMap getQueryMap(QueryMap map, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown)
          Returns a Converter instance of QueryMap.

 

Methods inherited from class com.oracle.common.collections.ConverterCollections
convertArray, convertArray, getCollection, getEntry, getEntrySet, getIterator, getList, getListIterator, getMap, getSet, getSortedMap, getSortedSet

 

Constructor Detail

ConverterCollections

public ConverterCollections()

Method Detail

getConcurrentMap

public static ConverterCollections.ConverterConcurrentMap getConcurrentMap(ConcurrentMap map,
                                                                           Converter convKeyUp,
                                                                           Converter convKeyDown,
                                                                           Converter convValUp,
                                                                           Converter convValDown)
Returns a Converter instance of ConcurrentMap.
Parameters:
map - the underlying ConcurrentMap
convKeyUp - the Converter to view the underlying ConcurrentMap's keys through
convKeyDown - the Converter to use to pass keys down to the underlying ConcurrentMap
convValUp - the Converter to view the underlying ConcurrentMap's values through
convValDown - the Converter to use to pass values down to the underlying ConcurrentMap
Returns:
a ConcurrentMap that views the keys and values of the passed ConcurrentMap through the specified Converters

getInvocableMap

public static ConverterCollections.ConverterInvocableMap getInvocableMap(InvocableMap map,
                                                                         Converter convKeyUp,
                                                                         Converter convKeyDown,
                                                                         Converter convValUp,
                                                                         Converter convValDown)
Returns a Converter instance of InvocableMap.
Parameters:
map - the underlying InvocableMap
convKeyUp - the Converter to view the underlying InvocableMap's keys through
convKeyDown - the Converter to use to pass keys down to the underlying InvocableMap
convValUp - the Converter to view the underlying InvocableMap's values through
convValDown - the Converter to use to pass values down to the underlying InvocableMap
Returns:
an InvocableMap that views the keys and values of the passed InvocableMap through the specified Converters

getObservableMap

public static ConverterCollections.ConverterObservableMap getObservableMap(ObservableMap map,
                                                                           Converter convKeyUp,
                                                                           Converter convKeyDown,
                                                                           Converter convValUp,
                                                                           Converter convValDown)
Returns a Converter instance of ObservableMap.
Parameters:
map - the underlying ObservableMap
convKeyUp - the Converter to view the underlying ObservableMap's keys through
convKeyDown - the Converter to use to pass keys down to the underlying ObservableMap
convValUp - the Converter to view the underlying ObservableMap's values through
convValDown - the Converter to use to pass values down to the underlying ObservableMap
Returns:
an ObservableMap that views the keys and values of the passed ObservableMap through the specified Converters

getQueryMap

public static ConverterCollections.ConverterQueryMap getQueryMap(QueryMap map,
                                                                 Converter convKeyUp,
                                                                 Converter convKeyDown,
                                                                 Converter convValUp,
                                                                 Converter convValDown)
Returns a Converter instance of QueryMap.
Parameters:
map - the underlying QueryMap
convKeyUp - the Converter to view the underlying QueryMap's keys through
convKeyDown - the Converter to use to pass keys down to the underlying QueryMap
convValUp - the Converter to view the underlying QueryMap's values through
convValDown - the Converter to use to pass values down to the underlying QueryMap
Returns:
a QueryMap that views the keys and values of the passed QueryMap through the specified Converters

getCacheMap

public static ConverterCollections.ConverterCacheMap getCacheMap(CacheMap map,
                                                                 Converter convKeyUp,
                                                                 Converter convKeyDown,
                                                                 Converter convValUp,
                                                                 Converter convValDown)
Returns a Converter instance of CacheMap.
Parameters:
map - the underlying CacheMap
convKeyUp - the Converter to view the underlying CacheMap's keys through
convKeyDown - the Converter to use to pass keys down to the underlying CacheMap
convValUp - the Converter to view the underlying CacheMap's values through
convValDown - the Converter to use to pass values down to the underlying CacheMap
Returns:
a CacheMap that views the keys and values of the passed CacheMap through the specified Converters

getNamedCache

public static ConverterCollections.ConverterNamedCache getNamedCache(NamedCache cache,
                                                                     Converter convKeyUp,
                                                                     Converter convKeyDown,
                                                                     Converter convValUp,
                                                                     Converter convValDown)
Returns a Converter instance of NamedCache.
Parameters:
cache - the underlying NamedCache
convKeyUp - the Converter to view the underlying NamedCache's keys through
convKeyDown - the Converter to use to pass keys down to the underlying NamedCache
convValUp - the Converter to view the underlying NamedCache's values through
convValDown - the Converter to use to pass values down to the underlying NamedCache
Returns:
a NamedCache that views the keys and values of the passed NamedCache through the specified Converters

getMapEvent

public static MapEvent getMapEvent(ObservableMap map,
                                   MapEvent event,
                                   Converter convKey,
                                   Converter convVal)
Returns an instance of a MapEvent that uses Converters to retrieve the event's data.
Parameters:
map - the new event's source
event - the underlying MapEvent
convKey - the Converter to view the underlying MapEvent's key
convVal - the Converter to view the underlying MapEvent's values
Returns:
a MapEvent that converts the passed event data using the specified Converter

getMapEvent

public static MapEvent getMapEvent(ObservableMap map,
                                   MapEvent event,
                                   Converter convKey,
                                   Converter convVal,
                                   BackingMapManagerContext context)
Returns an instance of a MapEvent that uses Converters to retrieve the event's data, and additionally provides access to the BackingMapManagerContext.
Parameters:
map - the new event's source
event - the underlying MapEvent
convKey - the Converter to view the underlying MapEvent's key
convVal - the Converter to view the underlying MapEvent's values
context - the BackingMapManagerContext used to deserialize the underlying values
Returns:
a MapEvent that converts the passed event data using the specified Converters

convertArray

public static java.lang.Object[] convertArray(java.lang.Object[] ao,
                                              Converter conv)
Convert the contents of the passed array. The conversion is done "in place" in the passed array.

This helper method is intended to support the functionality of Collection.toArray.

Parameters:
ao - an array of Objects to convert
conv - the Converter to use to convert the objects
Returns:
the passed array

convertArray

public static java.lang.Object[] convertArray(java.lang.Object[] aoSrc,
                                              Converter conv,
                                              java.lang.Object[] aoDest)
Convert the contents of the passed source array into an array with the component type of the passed destination array, using the destination array itself if it is large enough, and placing a null in the first unused element of the destination array if it is larger than the source array.

This helper method is intended to support the functionality of Collection.toArray.

Parameters:
aoSrc - an array of Objects to convert
conv - the Converter to use to convert the objects
aoDest - the array to use to place the converted objects in if large enough, otherwise the array from which to obtain the component type to create a new array that is large enough
Returns:
an array whose component type is the same as the passed destination array and whose contents are the converted objects

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


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