Module utilities

Class StringMap

java.lang.Object
de.grogra.util.StringMap
All Implemented Interfaces:
Map, ModifiableMap, Serializable
Direct Known Subclasses:
SOBindingImpl

public class StringMap extends Object implements ModifiableMap, Serializable
See Also:
  • Field Details

    • TYPE

      public static final Type TYPE
  • Constructor Details

    • StringMap

      public StringMap(int capacity, boolean reverseSort)
    • StringMap

      public StringMap(int capacity)
    • StringMap

      public StringMap()
    • StringMap

      public StringMap(Object[] keyValuePairs)
    • StringMap

      public StringMap(Map parent)
  • Method Details

    • dup

      public StringMap dup()
    • getKeys

      public final String[] getKeys()
    • getValues

      public final void getValues(Object[] values)
    • findIndex

      public final int findIndex(String key)
    • findIndex

      public final int findIndex(String key, int begin, int length)
    • findIndex

      public final int findIndex(CharSequence key, int begin, int length, int fromIndex, int toIndex)
    • synchronizedPut

      public final Object synchronizedPut(String key, Object object)
    • put

      public final Object put(Object key, Object object)
      Description copied from interface: ModifiableMap
      Maps key to value. Following invocations of the get-method with key as key will return value.
      Specified by:
      put in interface ModifiableMap
      Parameters:
      key - a key
      object - the value to be associated with key
      Returns:
      the previously associated value, or null
    • put

      public final Object put(String key, Object object)
    • synchronizedGet

      public final Object synchronizedGet(String key)
    • get

      public final Object get(String key)
    • get

      public final Object get(String key, boolean includeParent)
    • synchronizedRemove

      public final Object synchronizedRemove(String key)
    • remove

      public final Object remove(String key)
    • removeAt

      public final Object removeAt(int index)
    • containsKey

      public final boolean containsKey(String key)
    • containsKey

      public final boolean containsKey(Object key)
    • get

      public final Object get(Object key, Object defaultValue)
      Description copied from interface: Map
      Returns the value associated with key. If there is no value associated with key, defaultValue is returned.
      Specified by:
      get in interface Map
      Parameters:
      key - a key for the map
      defaultValue - the default value
      Returns:
      the associated value, or defaultValue
    • size

      public final int size()
    • isEmpty

      public final boolean isEmpty()
    • getKeyAt

      public final String getKeyAt(int index)
    • getValueAt

      public final Object getValueAt(int index)
    • setValueAt

      public final Object setValueAt(int index, Object value)
    • clear

      public final void clear()
    • disposeValuesAndClear

      public final void disposeValuesAndClear()
    • putBoolean

      public final StringMap putBoolean(String key, boolean value)
    • getBoolean

      public final boolean getBoolean(String key)
    • getBoolean

      public final boolean getBoolean(String key, boolean defaultValue)
    • putByte

      public final StringMap putByte(String key, byte value)
    • getByte

      public final byte getByte(String key)
    • getByte

      public final byte getByte(String key, byte defaultValue)
    • putShort

      public final StringMap putShort(String key, short value)
    • getShort

      public final short getShort(String key)
    • getShort

      public final short getShort(String key, short defaultValue)
    • putChar

      public final StringMap putChar(String key, char value)
    • getChar

      public final char getChar(String key)
    • getChar

      public final char getChar(String key, char defaultValue)
    • putInt

      public final StringMap putInt(String key, int value)
    • getInt

      public final int getInt(String key)
    • getInt

      public final int getInt(String key, int defaultValue)
    • putLong

      public final StringMap putLong(String key, long value)
    • getLong

      public final long getLong(String key)
    • getLong

      public final long getLong(String key, long defaultValue)
    • putFloat

      public final StringMap putFloat(String key, float value)
    • getFloat

      public final float getFloat(String key)
    • getFloat

      public final float getFloat(String key, float defaultValue)
    • putDouble

      public final StringMap putDouble(String key, double value)
    • getDouble

      public final double getDouble(String key)
    • getDouble

      public final double getDouble(String key, double defaultValue)
    • putObject

      public final StringMap putObject(String key, Object value)
    • getObject

      public final Object getObject(String key)
    • getObject

      public final Object getObject(String key, Object defaultValue)
    • getString

      public final String getString(String key)
    • toMap

      public final Map toMap()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • main

      public static void main(String[] args)