Oracle® Coherence Java API Reference
v3.5

E14977-01

com.tangosol.util
Class RestrictedCollections

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.RestrictedCollections

public class RestrictedCollections
extends Base

A collection of Collection implementation classes that limit the data type.

Author:
cp 2001.10.09

Nested Class Summary
static class RestrictedCollections.RestrictedCollection
          A restricted Collection that requires its contents to be of a specified class.
static class RestrictedCollections.RestrictedEntrySet
          A restricted Collection that requires its contents to be of a specified class.
static class RestrictedCollections.RestrictedList
          A restricted List that requires its contents to be of a specified class.
static class RestrictedCollections.RestrictedListIterator
          A restricted ListIterator that requires its contents to be of a specified class.
static class RestrictedCollections.RestrictedMap
          A restricted Map that requires its keys and values to be of specified classes.
static class RestrictedCollections.RestrictedSet
          A restricted Set that requires its contents to be of a specified class.
static class RestrictedCollections.RestrictedSortedMap
          A restricted SortedMap that requires its keys and values to be of specified classes.
static class RestrictedCollections.RestrictedSortedSet
          A restricted Set that requires its contents to be of a specified class.
 
Method Summary
static java.util.Collection getCollection(java.util.Collection col, java.lang.Class clz)
          Returns a restricted instance of Collection.
static java.util.Set getEntrySet(java.util.Set set, java.lang.Class clzKey, java.lang.Class clzVal)
          Returns a restricted instance of Set that holds Entry objects for a RestrictedMap.
static java.util.List getList(java.util.List list, java.lang.Class clz)
          Returns a restricted instance of List.
static java.util.ListIterator getListIterator(java.util.ListIterator iter, java.lang.Class clz)
          Returns a restricted instance of ListIterator.
static java.util.Map getMap(java.util.Map map, java.lang.Class clzKey, java.lang.Class clzVal)
          Returns a restricted instance of Map.
static java.util.Set getSet(java.util.Set set, java.lang.Class clz)
          Returns a restricted instance of Set.
static java.util.SortedMap getSortedMap(java.util.SortedMap map, java.lang.Class clzKey, java.lang.Class clzVal)
          Returns a restricted instance of SortedMap.
static java.util.SortedSet getSortedSet(java.util.SortedSet set, java.lang.Class clz)
          Returns a restricted instance of SortedSet.
 

Method Detail

getCollection

public static java.util.Collection getCollection(java.util.Collection col,
                                                 java.lang.Class clz)
Returns a restricted instance of Collection.

Parameters:
col - the underlying Collection
clz - the class of objects that may be stored in the Collection
Returns:
a restricted Collection that requires its contents to be of the specified class

getSet

public static java.util.Set getSet(java.util.Set set,
                                   java.lang.Class clz)
Returns a restricted instance of Set.

Parameters:
set - the underlying Set
clz - the class of objects that may be stored in the Set
Returns:
a restricted Set that requires its contents to be of the specified class

getSortedSet

public static java.util.SortedSet getSortedSet(java.util.SortedSet set,
                                               java.lang.Class clz)
Returns a restricted instance of SortedSet.

Parameters:
set - the underlying SortedSet
clz - the class of objects that may be stored in the SortedSet
Returns:
a restricted SortedSet that requires its contents to be of the specified class

getList

public static java.util.List getList(java.util.List list,
                                     java.lang.Class clz)
Returns a restricted instance of List.

Parameters:
list - the underlying List
clz - the class of objects that may be stored in the List
Returns:
a restricted List that requires its contents to be of the specified class

getListIterator

public static java.util.ListIterator getListIterator(java.util.ListIterator iter,
                                                     java.lang.Class clz)
Returns a restricted instance of ListIterator.

Parameters:
iter - the underlying ListIterator
clz - the class of objects that may be stored in the List
Returns:
a restricted ListIterator that requires its contents to be of the specified class

getMap

public static java.util.Map getMap(java.util.Map map,
                                   java.lang.Class clzKey,
                                   java.lang.Class clzVal)
Returns a restricted instance of Map.

Parameters:
map - the underlying Map
clzKey - the class of keys that may be stored in the Map
clzVal - the class of values that may be stored in the Map
Returns:
a restricted Map that requires its keys and values to be of the specified classes

getSortedMap

public static java.util.SortedMap getSortedMap(java.util.SortedMap map,
                                               java.lang.Class clzKey,
                                               java.lang.Class clzVal)
Returns a restricted instance of SortedMap.

Parameters:
map - the underlying SortedMap
clzKey - the class of keys that may be stored in the SortedMap
clzVal - the class of values that may be stored in the SortedMap
Returns:
a restricted SortedMap that requires its keys and values to be of the specified classes

getEntrySet

public static java.util.Set getEntrySet(java.util.Set set,
                                        java.lang.Class clzKey,
                                        java.lang.Class clzVal)
Returns a restricted instance of Set that holds Entry objects for a RestrictedMap.

Parameters:
set - the underlying Entry Set
clzKey - the class of keys that may be stored in the Map
clzVal - the class of values that may be stored in the Map
Returns:
a restricted Set that requires its contents to be Entry objects with the specified key and value restrictions

Oracle® Coherence Java API Reference
v3.5

E14977-01

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