Package com.tangosol.util
Class RestrictedCollections
- java.lang.Object
-
- com.tangosol.util.Base
-
- 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
Nested Classes Modifier and Type Class Description static classRestrictedCollections.RestrictedCollectionA restricted Collection that requires its contents to be of a specified class.static classRestrictedCollections.RestrictedEntrySetA restricted Collection that requires its contents to be of a specified class.static classRestrictedCollections.RestrictedListA restricted List that requires its contents to be of a specified class.static classRestrictedCollections.RestrictedListIteratorA restricted ListIterator that requires its contents to be of a specified class.static classRestrictedCollections.RestrictedMapA restricted Map that requires its keys and values to be of specified classes.static classRestrictedCollections.RestrictedSetA restricted Set that requires its contents to be of a specified class.static classRestrictedCollections.RestrictedSortedMapA restricted SortedMap that requires its keys and values to be of specified classes.static classRestrictedCollections.RestrictedSortedSetA restricted Set that requires its contents to be of a specified class.-
Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CollectiongetCollection(Collection col, Class clz)Returns a restricted instance of Collection.static SetgetEntrySet(Set set, Class clzKey, Class clzVal)Returns a restricted instance of Set that holds Entry objects for a RestrictedMap.static ListgetList(List list, Class clz)Returns a restricted instance of List.static ListIteratorgetListIterator(ListIterator iter, Class clz)Returns a restricted instance of ListIterator.static MapgetMap(Map map, Class clzKey, Class clzVal)Returns a restricted instance of Map.static SetgetSet(Set set, Class clz)Returns a restricted instance of Set.static SortedMapgetSortedMap(SortedMap map, Class clzKey, Class clzVal)Returns a restricted instance of SortedMap.static SortedSetgetSortedSet(SortedSet set, Class clz)Returns a restricted instance of SortedSet.-
Methods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, newHashMap, newHashMap, newHashSet, newHashSet, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
-
-
-
-
Method Detail
-
getCollection
public static Collection getCollection(Collection col, Class clz)
Returns a restricted instance of Collection.- Parameters:
col- the underlying Collectionclz- 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 Set getSet(Set set, Class clz)
Returns a restricted instance of Set.- Parameters:
set- the underlying Setclz- 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 SortedSet getSortedSet(SortedSet set, Class clz)
Returns a restricted instance of SortedSet.- Parameters:
set- the underlying SortedSetclz- 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 List getList(List list, Class clz)
Returns a restricted instance of List.- Parameters:
list- the underlying Listclz- 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 ListIterator getListIterator(ListIterator iter, Class clz)
Returns a restricted instance of ListIterator.- Parameters:
iter- the underlying ListIteratorclz- 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 Map getMap(Map map, Class clzKey, Class clzVal)
Returns a restricted instance of Map.- Parameters:
map- the underlying MapclzKey- the class of keys that may be stored in the MapclzVal- 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 SortedMap getSortedMap(SortedMap map, Class clzKey, Class clzVal)
Returns a restricted instance of SortedMap.- Parameters:
map- the underlying SortedMapclzKey- the class of keys that may be stored in the SortedMapclzVal- 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 Set getEntrySet(Set set, Class clzKey, Class clzVal)
Returns a restricted instance of Set that holds Entry objects for a RestrictedMap.- Parameters:
set- the underlying Entry SetclzKey- the class of keys that may be stored in the MapclzVal- 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
-
-