Klasse Int2ObjectMap.MapBuilder

java.lang.Object
speiger.src.collections.ints.maps.interfaces.Int2ObjectMap.MapBuilder
Umschließende Schnittstelle:
Int2ObjectMap<V>

public static final class Int2ObjectMap.MapBuilder extends Object
Helper class that reduces the method spam of the Map Class.
  • Konstruktordetails

    • MapBuilder

      public MapBuilder()
  • Methodendetails

    • start

      public <V> Int2ObjectMap.BuilderCache<V> start()
      Starts a Map Builder that allows you to create maps as Constants a lot easier Keys and Values are stored as Array and then inserted using the putAllMethod when the mapType is choosen
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Gibt zurück:
      a MapBuilder
    • start

      public <V> Int2ObjectMap.BuilderCache<V> start(int size)
      Starts a Map Builder that allows you to create maps as Constants a lot easier Keys and Values are stored as Array and then inserted using the putAllMethod when the mapType is choosen
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      size - the expected minimum size of Elements in the Map, default is 16
      Gibt zurück:
      a MapBuilder
    • put

      public <V> Int2ObjectMap.BuilderCache<V> put(int key, V value)
      Starts a Map builder and puts in the Key and Value into it Keys and Values are stored as Array and then inserted using the putAllMethod when the mapType is choosen
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      key - the key that should be added
      value - the value that should be added
      Gibt zurück:
      a MapBuilder with the key and value stored in it.
    • put

      public <V> Int2ObjectMap.BuilderCache<V> put(Integer key, V value)
      Starts a Map builder and puts in the Key and Value into it Keys and Values are stored as Array and then inserted using the putAllMethod when the mapType is choosen
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      key - the key that should be added
      value - the value that should be added
      Gibt zurück:
      a MapBuilder with the key and value stored in it.
    • map

      public <V> Int2ObjectOpenHashMap<V> map()
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Gibt zurück:
      a OpenHashMap
    • map

      public <V> Int2ObjectOpenHashMap<V> map(int size)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      size - the minimum capacity of the Map
      Gibt zurück:
      a OpenHashMap with a mimimum capacity
    • map

      public <V> Int2ObjectOpenHashMap<V> map(int[] keys, V[] values)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      Gibt zurück:
      a OpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
    • map

      public <V> Int2ObjectOpenHashMap<V> map(Integer[] keys, V[] values)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      Gibt zurück:
      a OpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
      Note:
      the keys and values will be unboxed
    • map

      public <V> Int2ObjectOpenHashMap<V> map(Int2ObjectMap<V> map)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      Gibt zurück:
      a OpenHashMap thats copies the contents of the provided map
    • map

      public <V> Int2ObjectOpenHashMap<V> map(Map<? extends Integer,? extends V> map)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      Gibt zurück:
      a OpenHashMap thats copies the contents of the provided map
      Note:
      the map will be unboxed
    • linkedMap

      public <V> Int2ObjectLinkedOpenHashMap<V> linkedMap()
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Gibt zurück:
      a LinkedOpenHashMap
    • linkedMap

      public <V> Int2ObjectLinkedOpenHashMap<V> linkedMap(int size)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      size - the minimum capacity of the Map
      Gibt zurück:
      a LinkedOpenHashMap with a mimimum capacity
    • linkedMap

      public <V> Int2ObjectLinkedOpenHashMap<V> linkedMap(int[] keys, V[] values)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      Gibt zurück:
      a LinkedOpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
    • linkedMap

      public <V> Int2ObjectLinkedOpenHashMap<V> linkedMap(Integer[] keys, V[] values)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      Gibt zurück:
      a LinkedOpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
      Note:
      the keys and values will be unboxed
    • linkedMap

      public <V> Int2ObjectLinkedOpenHashMap<V> linkedMap(Int2ObjectMap<V> map)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      Gibt zurück:
      a LinkedOpenHashMap thats copies the contents of the provided map
    • linkedMap

      public <V> ImmutableInt2ObjectOpenHashMap<V> linkedMap(Map<? extends Integer,? extends V> map)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      Gibt zurück:
      a LinkedOpenHashMap thats copies the contents of the provided map
      Note:
      the map will be unboxed
    • immutable

      public <V> ImmutableInt2ObjectOpenHashMap<V> immutable(int[] keys, V[] values)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      Gibt zurück:
      a ImmutableOpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
    • immutable

      public <V> ImmutableInt2ObjectOpenHashMap<V> immutable(Integer[] keys, V[] values)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      Gibt zurück:
      a ImmutableOpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
      Note:
      the keys and values will be unboxed
    • immutable

      public <V> ImmutableInt2ObjectOpenHashMap<V> immutable(Int2ObjectMap<V> map)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      Gibt zurück:
      a ImmutableOpenHashMap thats copies the contents of the provided map
    • immutable

      public <V> ImmutableInt2ObjectOpenHashMap<V> immutable(Map<? extends Integer,? extends V> map)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      Gibt zurück:
      a ImmutableOpenHashMap thats copies the contents of the provided map
      Note:
      the map will be unboxed
    • customMap

      public <V> Int2ObjectOpenCustomHashMap<V> customMap(IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      strategy - the Hash Controller
      Gibt zurück:
      a CustomOpenHashMap
    • customMap

      public <V> Int2ObjectOpenCustomHashMap<V> customMap(int size, IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      size - the minimum capacity of the Map
      strategy - the Hash Controller
      Gibt zurück:
      a CustomOpenHashMap with a mimimum capacity
    • customMap

      public <V> Int2ObjectOpenCustomHashMap<V> customMap(int[] keys, V[] values, IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      strategy - the Hash Controller
      Gibt zurück:
      a CustomOpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
    • customMap

      public <V> Int2ObjectOpenCustomHashMap<V> customMap(Integer[] keys, V[] values, IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      strategy - the Hash Controller
      Gibt zurück:
      a CustomOpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
      Note:
      the keys and values will be unboxed
    • customMap

      public <V> Int2ObjectOpenCustomHashMap<V> customMap(Int2ObjectMap<V> map, IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      strategy - the Hash Controller
      Gibt zurück:
      a CustomOpenHashMap thats copies the contents of the provided map
    • customMap

      public <V> Int2ObjectOpenCustomHashMap<V> customMap(Map<? extends Integer,? extends V> map, IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      strategy - the Hash Controller
      Gibt zurück:
      a CustomOpenHashMap thats copies the contents of the provided map
      Note:
      the map will be unboxed
    • customLinkedMap

      public <V> Int2ObjectLinkedOpenCustomHashMap<V> customLinkedMap(IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      strategy - the Hash Controller
      Gibt zurück:
      a CustomLinkedOpenHashMap
    • customLinkedMap

      public <V> Int2ObjectLinkedOpenCustomHashMap<V> customLinkedMap(int size, IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      size - the minimum capacity of the Map
      strategy - the Hash Controller
      Gibt zurück:
      a CustomLinkedOpenHashMap with a mimimum capacity
    • customLinkedMap

      public <V> Int2ObjectLinkedOpenCustomHashMap<V> customLinkedMap(int[] keys, V[] values, IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      strategy - the Hash Controller
      Gibt zurück:
      a CustomLinkedOpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
    • customLinkedMap

      public <V> Int2ObjectLinkedOpenCustomHashMap<V> customLinkedMap(Integer[] keys, V[] values, IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      strategy - the Hash Controller
      Gibt zurück:
      a CustomLinkedOpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
      Note:
      the keys and values will be unboxed
    • customLinkedMap

      public <V> Int2ObjectLinkedOpenCustomHashMap<V> customLinkedMap(Int2ObjectMap<V> map, IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      strategy - the Hash Controller
      Gibt zurück:
      a CustomLinkedOpenHashMap thats copies the contents of the provided map
    • customLinkedMap

      public <V> Int2ObjectLinkedOpenCustomHashMap<V> customLinkedMap(Map<? extends Integer,? extends V> map, IntStrategy strategy)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      strategy - the Hash Controller
      Gibt zurück:
      a CustomLinkedOpenHashMap thats copies the contents of the provided map
      Note:
      the map will be unboxed
    • arrayMap

      public <V> Int2ObjectArrayMap<V> arrayMap()
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Gibt zurück:
      a OpenHashMap
    • arrayMap

      public <V> Int2ObjectArrayMap<V> arrayMap(int size)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      size - the minimum capacity of the Map
      Gibt zurück:
      a OpenHashMap with a mimimum capacity
    • arrayMap

      public <V> Int2ObjectArrayMap<V> arrayMap(int[] keys, V[] values)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      Gibt zurück:
      a OpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
    • arrayMap

      public <V> Int2ObjectArrayMap<V> arrayMap(Integer[] keys, V[] values)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      Gibt zurück:
      a OpenHashMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
      Note:
      the keys and values will be unboxed
    • arrayMap

      public <V> Int2ObjectArrayMap<V> arrayMap(Int2ObjectMap<V> map)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      Gibt zurück:
      a OpenHashMap thats copies the contents of the provided map
    • arrayMap

      public <V> Int2ObjectArrayMap<V> arrayMap(Map<? extends Integer,? extends V> map)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      Gibt zurück:
      a OpenHashMap thats copies the contents of the provided map
      Note:
      the map will be unboxed
    • rbTreeMap

      public <V> Int2ObjectRBTreeMap<V> rbTreeMap()
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Gibt zurück:
      a RBTreeMap
    • rbTreeMap

      public <V> Int2ObjectRBTreeMap<V> rbTreeMap(IntComparator comp)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      comp - the Sorter of the TreeMap
      Gibt zurück:
      a RBTreeMap
    • rbTreeMap

      public <V> Int2ObjectRBTreeMap<V> rbTreeMap(int[] keys, V[] values, IntComparator comp)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      comp - the Sorter of the TreeMap
      Gibt zurück:
      a RBTreeMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
    • rbTreeMap

      public <V> Int2ObjectRBTreeMap<V> rbTreeMap(Integer[] keys, V[] values, IntComparator comp)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      comp - the Sorter of the TreeMap
      Gibt zurück:
      a RBTreeMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
      Note:
      the keys and values will be unboxed
    • rbTreeMap

      public <V> Int2ObjectRBTreeMap<V> rbTreeMap(Int2ObjectMap<V> map, IntComparator comp)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      comp - the Sorter of the TreeMap
      Gibt zurück:
      a RBTreeMap thats copies the contents of the provided map
    • rbTreeMap

      public <V> Int2ObjectRBTreeMap<V> rbTreeMap(Map<? extends Integer,? extends V> map, IntComparator comp)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      comp - the Sorter of the TreeMap
      Gibt zurück:
      a RBTreeMap thats copies the contents of the provided map
      Note:
      the map will be unboxed
    • avlTreeMap

      public <V> Int2ObjectAVLTreeMap<V> avlTreeMap()
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Gibt zurück:
      a AVLTreeMap
    • avlTreeMap

      public <V> Int2ObjectAVLTreeMap<V> avlTreeMap(IntComparator comp)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      comp - the Sorter of the TreeMap
      Gibt zurück:
      a AVLTreeMap
    • avlTreeMap

      public <V> Int2ObjectAVLTreeMap<V> avlTreeMap(int[] keys, V[] values, IntComparator comp)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      comp - the Sorter of the TreeMap
      Gibt zurück:
      a AVLTreeMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
    • avlTreeMap

      public <V> Int2ObjectAVLTreeMap<V> avlTreeMap(Integer[] keys, V[] values, IntComparator comp)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      keys - the keys that should be inserted
      values - the values that should be inserted
      comp - the Sorter of the TreeMap
      Gibt zurück:
      a AVLTreeMap thats contains the injected values
      Löst aus:
      IllegalStateException - if the keys and values do not match in length
      Note:
      the keys and values will be unboxed
    • avlTreeMap

      public <V> Int2ObjectAVLTreeMap<V> avlTreeMap(Int2ObjectMap<V> map, IntComparator comp)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      comp - the Sorter of the TreeMap
      Gibt zurück:
      a AVLTreeMap thats copies the contents of the provided map
    • avlTreeMap

      public <V> Int2ObjectAVLTreeMap<V> avlTreeMap(Map<? extends Integer,? extends V> map, IntComparator comp)
      Helper function to unify code
      Typparameter:
      V - the keyType of elements maintained by this Collection
      Parameter:
      map - that should be cloned
      comp - the Sorter of the TreeMap
      Gibt zurück:
      a AVLTreeMap thats copies the contents of the provided map
      Note:
      the map will be unboxed