de.esprit.common.util

## Class PowerMap<K,V>

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap<K,V>
    - - java.util.LinkedHashMap<K,V>
      - - de.esprit.common.util.PowerMap<K,V>

- All Implemented Interfaces:
    Dumpable, java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>
  Direct Known Subclasses:
    NdfProperties, PropertyMap

      public class PowerMap<K,V>
      extends java.util.LinkedHashMap<K,V>
      implements Dumpable, java.lang.Cloneable

  This map provides a set of accessor methods in order to convert values as needed. It also implements `Dumpable` and thus is able to dump it's content.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PowerMap()`
    `PowerMap(int initialCapacity)`
    `PowerMap(int initialCapacity, float loadFactor)`
    `PowerMap(int initialCapacity, float loadFactor, boolean accessOrder)`
    `PowerMap(java.util.Map<? extends K,? extends V> map)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.String` | `createDumpHeader()`
    `boolean` | `getAsBoolean(java.lang.String key)`
    `boolean` | `getAsBoolean(java.lang.String key, boolean defaultValue)`
    `java.util.Date` | `getAsDate(java.lang.String key)`
    `java.util.Date` | `getAsDate(java.lang.String key, java.util.Date defaultValue)`
    `double` | `getAsDouble(java.lang.String key)`
    `double` | `getAsDouble(java.lang.String key, double defaultValue)`
    `Duration` | `getAsDuration(java.lang.String key)`
    `Duration` | `getAsDuration(java.lang.String key, Duration defaultValue)`
    `float` | `getAsFloat(java.lang.String key)`
    `float` | `getAsFloat(java.lang.String key, float defaultValue)`
    `int` | `getAsInt(java.lang.String key)`
    `int` | `getAsInt(java.lang.String key, int defaultValue)`
    `long` | `getAsLong(java.lang.String key)`
    `long` | `getAsLong(java.lang.String key, long defaultValue)`
    `short` | `getAsShort(java.lang.String key)`
    `short` | `getAsShort(java.lang.String key, short defaultValue)`
    `java.lang.String` | `getAsString(java.lang.String key)`
    `java.lang.String` | `getAsString(java.lang.String key, java.lang.String defaultValue)`
    `java.sql.Time` | `getAsTime(java.lang.String key)`
    `java.sql.Time` | `getAsTime(java.lang.String key, java.sql.Time defaultValue)`
    `java.sql.Timestamp` | `getAsTimestamp(java.lang.String key)`
    `java.sql.Timestamp` | `getAsTimestamp(java.lang.String key, java.sql.Timestamp defaultValue)`
    `int` | `getMaxKeyLength()`
    `void` | `reverse()` Reverses the order of the entries in this map
    `java.lang.String` | `toDumpString()` Returns a multi-line String that shows the values (name=value) of all important state variables of this object.
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `java.lang.String` | `toString()` Returns a single line String that shows the values of the most important state variables of this object.
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class java.util.LinkedHashMap

      `clear, containsValue, get, removeEldestEntry`

    - ### Methods inherited from class java.util.HashMap

      `clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values`

- - ### Constructor Detail

    - #### PowerMap

          public PowerMap()

    - #### PowerMap

          public PowerMap(int initialCapacity,
                  float loadFactor,
                  boolean accessOrder)

    - #### PowerMap

          public PowerMap(int initialCapacity,
                  float loadFactor)

    - #### PowerMap

          public PowerMap(int initialCapacity)

    - #### PowerMap

          public PowerMap(java.util.Map<? extends K,? extends V> map)

  - ### Method Detail

    - #### getMaxKeyLength

          public final int getMaxKeyLength()

    - #### getAsBoolean

          public boolean getAsBoolean(java.lang.String key)

    - #### getAsBoolean

          public boolean getAsBoolean(java.lang.String key,
                             boolean defaultValue)

    - #### getAsString

          public final java.lang.String getAsString(java.lang.String key)

    - #### getAsString

          public final java.lang.String getAsString(java.lang.String key,
                                     java.lang.String defaultValue)

    - #### getAsShort

          public final short getAsShort(java.lang.String key)

    - #### getAsShort

          public final short getAsShort(java.lang.String key,
                         short defaultValue)

    - #### getAsInt

          public final int getAsInt(java.lang.String key)

    - #### getAsInt

          public final int getAsInt(java.lang.String key,
                     int defaultValue)

    - #### getAsLong

          public final long getAsLong(java.lang.String key)

    - #### getAsLong

          public final long getAsLong(java.lang.String key,
                       long defaultValue)

    - #### getAsFloat

          public final float getAsFloat(java.lang.String key)

    - #### getAsFloat

          public final float getAsFloat(java.lang.String key,
                         float defaultValue)

    - #### getAsDouble

          public final double getAsDouble(java.lang.String key)

    - #### getAsDouble

          public final double getAsDouble(java.lang.String key,
                           double defaultValue)

    - #### getAsTimestamp

          public java.sql.Timestamp getAsTimestamp(java.lang.String key)
                                            throws java.text.ParseException

      Throws:
        `java.text.ParseException`

    - #### getAsTimestamp

          public java.sql.Timestamp getAsTimestamp(java.lang.String key,
                                          java.sql.Timestamp defaultValue)
                                            throws java.text.ParseException

      Throws:
        `java.text.ParseException`

    - #### getAsDate

          public java.util.Date getAsDate(java.lang.String key)
                                   throws java.text.ParseException

      Throws:
        `java.text.ParseException`

    - #### getAsDate

          public java.util.Date getAsDate(java.lang.String key,
                                 java.util.Date defaultValue)
                                   throws java.text.ParseException

      Throws:
        `java.text.ParseException`

    - #### getAsDuration

          public Duration getAsDuration(java.lang.String key)

    - #### getAsDuration

          public Duration getAsDuration(java.lang.String key,
                               Duration defaultValue)

    - #### getAsTime

          public java.sql.Time getAsTime(java.lang.String key)
                                  throws java.text.ParseException

      Throws:
        `java.text.ParseException`

    - #### getAsTime

          public java.sql.Time getAsTime(java.lang.String key,
                                java.sql.Time defaultValue)
                                  throws java.text.ParseException

      Throws:
        `java.text.ParseException`

    - #### reverse

          public void reverse()

      Reverses the order of the entries in this map

    - #### createDumpHeader

          protected java.lang.String createDumpHeader()

    - #### toString

          public final java.lang.String toString()

      Description copied from interface: `Dumpable`
      Returns a single line String that shows the values of the most important state variables of this object. This is intentionally the same toString() method which is already provided by Object per se.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `java.util.AbstractMap<K,V>`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`

    - #### toDumpString

          public final java.lang.String toDumpString()

      Description copied from interface: `Dumpable`
      Returns a multi-line String that shows the values (name=value) of all important state variables of this object.
      Specified by:
        `toDumpString` in interface `Dumpable`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.