Package org.checkerframework.javacutil
Class CollectionUtils
- java.lang.Object
 - 
- org.checkerframework.javacutil.CollectionUtils
 
 
- 
public class CollectionUtils extends java.lang.ObjectUtility methods related to Java Collections. 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T extends @Nullable java.lang.Object,C extends @Nullable java.util.Collection<T>>
@PolyNull CcloneElements(@PolyNull C orig)Deprecated.use org.plumelib.util.CollectionsPlume.cloneElementsstatic <K,V,M extends @Nullable java.util.Map<K,V>>
@PolyNull McloneElements(@PolyNull M orig)Deprecated.use org.plumelib.util.CollectionsPlume.cloneElementsstatic <K,V,M extends @Nullable java.util.Map<K,V>>
@PolyNull McloneValues(@PolyNull M orig)Deprecated.use org.plumelib.util.CollectionsPlume.cloneValuesstatic <K,V>
java.util.Map<K,V>createLRUCache(int size)Deprecated.use org.plumelib.util.CollectionsPlume.createLruCachestatic <T extends @Nullable org.plumelib.util.DeepCopyable<T>,C extends @Nullable java.util.Collection<T>>
@PolyNull CdeepCopy(@PolyNull C orig)Deprecated.use org.plumelib.util.CollectionsPlume.deepCopystatic <K extends @Nullable org.plumelib.util.DeepCopyable<K>,V extends @Nullable org.plumelib.util.DeepCopyable<V>,M extends @Nullable java.util.Map<K,V>>
@PolyNull MdeepCopy(@PolyNull M orig)Deprecated.use org.plumelib.util.CollectionsPlume.deepCopystatic <K,V extends @Nullable org.plumelib.util.DeepCopyable<V>,M extends @Nullable java.util.Map<K,V>>
@PolyNull MdeepCopyValues(@PolyNull M orig)Deprecated.use org.plumelib.util.CollectionsPlume.deepCopyValues 
 - 
 
- 
- 
Method Detail
- 
createLRUCache
@Deprecated public static <K,V> java.util.Map<K,V> createLRUCache(int size)
Deprecated.use org.plumelib.util.CollectionsPlume.createLruCacheCreates a LRU cache.- Parameters:
 size- size of the cache- Returns:
 - a new cache with the provided size
 
 
- 
cloneElements
@Deprecated public static <T extends @Nullable java.lang.Object,C extends @Nullable java.util.Collection<T>> @PolyNull C cloneElements(@PolyNull C orig)
Deprecated.use org.plumelib.util.CollectionsPlume.cloneElementsReturns a copy oforig, where each element of the result is a clone of the corresponding element oforig.- Type Parameters:
 T- the type of elements of the collectionC- the type of the collection- Parameters:
 orig- a collection- Returns:
 - a copy of 
orig, as described above 
 
- 
cloneElements
@Deprecated public static <K,V,M extends @Nullable java.util.Map<K,V>> @PolyNull M cloneElements(@PolyNull M orig)
Deprecated.use org.plumelib.util.CollectionsPlume.cloneElementsReturns a copy oforig, where each key and value in the result is a clone of the corresponding element oforig.- Type Parameters:
 K- the type of keys of the mapV- the type of values of the mapM- the type of the map- Parameters:
 orig- a map- Returns:
 - a copy of 
orig, as described above 
 
- 
cloneValues
@Deprecated public static <K,V,M extends @Nullable java.util.Map<K,V>> @PolyNull M cloneValues(@PolyNull M orig)
Deprecated.use org.plumelib.util.CollectionsPlume.cloneValuesReturns a copy oforig, where each value of the result is a clone of the corresponding value oforig, but the keys are the same objects.- Type Parameters:
 K- the type of keys of the mapV- the type of values of the mapM- the type of the map- Parameters:
 orig- a map- Returns:
 - a copy of 
orig, as described above 
 
- 
deepCopy
@Deprecated public static <T extends @Nullable org.plumelib.util.DeepCopyable<T>,C extends @Nullable java.util.Collection<T>> @PolyNull C deepCopy(@PolyNull C orig)
Deprecated.use org.plumelib.util.CollectionsPlume.deepCopyReturns a copy oforig, where each element of the result is a deep copy (according to theDeepCopyableinterface) of the corresponding element oforig.- Type Parameters:
 T- the type of elements of the collectionC- the type of the collection- Parameters:
 orig- a collection- Returns:
 - a copy of 
orig, as described above 
 
- 
deepCopy
@Deprecated public static <K extends @Nullable org.plumelib.util.DeepCopyable<K>,V extends @Nullable org.plumelib.util.DeepCopyable<V>,M extends @Nullable java.util.Map<K,V>> @PolyNull M deepCopy(@PolyNull M orig)
Deprecated.use org.plumelib.util.CollectionsPlume.deepCopyReturns a copy oforig, where each key and value in the result is a deep copy (according to theDeepCopyableinterface) of the corresponding element oforig.- Type Parameters:
 K- the type of keys of the mapV- the type of values of the mapM- the type of the map- Parameters:
 orig- a map- Returns:
 - a copy of 
orig, as described above 
 
- 
deepCopyValues
@Deprecated public static <K,V extends @Nullable org.plumelib.util.DeepCopyable<V>,M extends @Nullable java.util.Map<K,V>> @PolyNull M deepCopyValues(@PolyNull M orig)
Deprecated.use org.plumelib.util.CollectionsPlume.deepCopyValuesReturns a copy oforig, where each value of the result is a deep copy (according to theDeepCopyableinterface) of the corresponding value oforig, but the keys are the same objects.- Type Parameters:
 K- the type of keys of the mapV- the type of values of the mapM- the type of the map- Parameters:
 orig- a map- Returns:
 - a copy of 
orig, as described above 
 
 - 
 
 -