public class AllocUtil extends Object
| Constructor and Description |
|---|
AllocUtil() |
| Modifier and Type | Method and Description |
|---|---|
<V> Set<V> |
addLinkedHashSet(Set<V> set,
V value) |
<V> List<V> |
addList(List<V> list,
V value)
Add value into the spcified list.
|
<V> Set<V> |
addSet(Set<V> set,
V value)
Add value into the specified set.
|
<V> Set<V> |
addWeakIdentityHashSet(Set<V> set,
V value) |
<K,V> Map<K,V> |
newLinkedHashMap(int size)
Prepare a suitable LinkedHashMap that optimize the space.
|
Object |
processScript(Object script)
Returns the processed script.
|
<K,V> Map<K,V> |
putLinkedHashMap(Map<K,V> map,
K key,
V value)
Put key, value into the specified LinkedHashMap.
|
<K,V> Map<K,V> |
putMap(Map<K,V> map,
K key,
V value)
Put key, value into the specified map.
|
public static AllocUtil inst
public <K,V> Map<K,V> putMap(Map<K,V> map, K key, V value)
map - the map to be put key, value in.key - the keyvalue - the valuepublic <K,V> Map<K,V> putLinkedHashMap(Map<K,V> map, K key, V value)
map - the LinkedHashMap to be put key, value in.key - the keyvalue - the valuepublic <K,V> Map<K,V> newLinkedHashMap(int size)
public <V> Set<V> addSet(Set<V> set, V value)
set - the set to be add value invalue - the valuepublic <V> List<V> addList(List<V> list, V value)
list - the list to be add value invalue - the valueCopyright © 2020. All rights reserved.