Package org.apache.solr.common.util
Class CollectionUtil
- java.lang.Object
- 
- org.apache.solr.common.util.CollectionUtil
 
- 
 public final class CollectionUtil extends Object Methods for creating collections with exact sizes, and other convenience methods- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
 
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisEmpty(Collection<?> collection)static booleanisNotEmpty(Collection<?> collection)static <K,V>
 HashMap<K,V>newHashMap(int size)Returns a newHashMapsized to containsizeitems without resizing the internal array.static <E> HashSet<E>newHashSet(int size)Returns a newHashSetsized to containsizeitems without resizing the internal array.static <K,V>
 LinkedHashMap<K,V>newLinkedHashMap(int size)Returns a newLinkedHashMapsized to containsizeitems without resizing the internal array.
 
- 
- 
- 
Method Detail- 
newHashMappublic static <K,V> HashMap<K,V> newHashMap(int size) Returns a newHashMapsized to containsizeitems without resizing the internal array.
 - 
newLinkedHashMappublic static <K,V> LinkedHashMap<K,V> newLinkedHashMap(int size) Returns a newLinkedHashMapsized to containsizeitems without resizing the internal array.
 - 
newHashSetpublic static <E> HashSet<E> newHashSet(int size) Returns a newHashSetsized to containsizeitems without resizing the internal array.
 - 
isEmptypublic static boolean isEmpty(Collection<?> collection) 
 - 
isNotEmptypublic static boolean isNotEmpty(Collection<?> collection) 
 
- 
 
-