Class AllocUtil

java.lang.Object
org.zkoss.bind.impl.AllocUtil

public class AllocUtil extends Object
For ZK-2289, Memory allocation utility.
Since:
7.0.3
Author:
henrichen
  • Field Details

  • Constructor Details

    • AllocUtil

      public AllocUtil()
  • Method Details

    • putMap

      public <K, V> Map<K,V> putMap(Map<K,V> map, K key, V value)
      Put key, value into the specified map.
      Parameters:
      map - the map to be put key, value in.
      key - the key
      value - the value
      Returns:
      the map
    • putLinkedHashMap

      public <K, V> Map<K,V> putLinkedHashMap(Map<K,V> map, K key, V value)
      Put key, value into the specified LinkedHashMap.
      Parameters:
      map - the LinkedHashMap to be put key, value in.
      key - the key
      value - the value
      Returns:
      the map
    • newLinkedHashMap

      public <K, V> Map<K,V> newLinkedHashMap(int size)
      Prepare a suitable LinkedHashMap that optimize the space.
    • addSet

      public <V> Set<V> addSet(Set<V> set, V value)
      Add value into the specified set.
      Parameters:
      set - the set to be add value in
      value - the value
      Returns:
      the set
    • addLinkedHashSet

      public <V> Set<V> addLinkedHashSet(Set<V> set, V value)
    • addWeakIdentityHashSet

      public <V> Set<V> addWeakIdentityHashSet(Set<V> set, V value)
    • addList

      public <V> List<V> addList(List<V> list, V value)
      Add value into the spcified list.
      Parameters:
      list - the list to be add value in
      value - the value
      Returns:
      the list
    • processScript

      public Object processScript(Object script)
      Returns the processed script.
      Parameters:
      script -