org.jboss.solder.util.collections
Class Maps
java.lang.Object
org.jboss.solder.util.collections.Maps
public class Maps
- extends Object
|
Method Summary |
static
|
immutableEntry(K key,
V value)
Returns an immutable map entry with the specified key and value. |
static
|
newHashMapWithExpectedSize(int expectedSize)
Creates a HashMap instance with enough capacity to hold the
specified number of elements without rehashing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
immutableEntry
public static <K,V> Map.Entry<K,V> immutableEntry(K key,
V value)
- Returns an immutable map entry with the specified key and value. The
Map.Entry.setValue(V) operation throws an
UnsupportedOperationException.
The returned entry is serializable.
- Parameters:
key - the key to be associated with the returned entryvalue - the value to be associated with the returned entry
newHashMapWithExpectedSize
public static <K,V> HashMap<K,V> newHashMapWithExpectedSize(int expectedSize)
- Creates a
HashMap instance with enough capacity to hold the
specified number of elements without rehashing.
- Parameters:
expectedSize - the expected size
- Returns:
- a new, empty
HashMap with enough
capacity to hold expectedSize elements without rehashing
- Throws:
IllegalArgumentException - if expectedSize is negative
Copyright © 2008-2011 Seam Framework. All Rights Reserved.