de.hfu.anybeam.networkCore

## Class UrlParameterBundle

- java.lang.Object
- - de.hfu.anybeam.networkCore.UrlParameterBundle

-     public class UrlParameterBundle
      extends java.lang.Object

  A class that can be used to create and parse URL encoded `String`s to store and transmit data in.
  Since:
    1.0
  Version:
    1.0
  Author:
    chrwuer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UrlParameterBundle()` Creates an empty `UrlParameterBundle` object.
    `UrlParameterBundle(java.lang.String url)` Creates a new `UrlParameterBundle` object and populates it with the values from the given URL `String`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `generateUrlString()` Creates an URL encoded `String` containing all parameters of this `UrlParameterBundle` object.
    `java.lang.String` | `get(java.lang.String key)` Returns the value of the parameter with the given key.
    `boolean` | `getBoolean(java.lang.String key)` Returns the value of the parameter with the given key.
    `double` | `getDouble(java.lang.String key)` Returns the value of the parameter with the given key.
    `float` | `getFloat(java.lang.String key)` Returns the value of the parameter with the given key.
    `int` | `getInteger(java.lang.String key)` Returns the value of the parameter with the given key.
    `long` | `getLong(java.lang.String key)` Returns the value of the parameter with the given key.
    `java.util.Map<java.lang.String,java.lang.String>` | `getMap()` Returns a map containing all parameters of this `UrlParameterBundle`.
    `UrlParameterBundle` | `put(java.lang.String key, java.lang.Object value)` Adds a parameter.

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UrlParameterBundle

          public UrlParameterBundle()

      Creates an empty `UrlParameterBundle` object.

    - #### UrlParameterBundle

          public UrlParameterBundle(java.lang.String url)

      Creates a new `UrlParameterBundle` object and populates it with the values from the given URL `String`
      Parameters:
        `url` - the URL to get the values from.

  - ### Method Detail

    - #### getMap

          public java.util.Map<java.lang.String,java.lang.String> getMap()

      Returns a map containing all parameters of this `UrlParameterBundle`.
      Returns:
        a map containing all parameters of this `UrlParameterBundle`

    - #### put

          public UrlParameterBundle put(java.lang.String key,
                               java.lang.Object value)

      Adds a parameter.
      Parameters:
        `key` - the key identifying the value
        `value` - the value. Keep in mind that all values are stored as `String`.
      Returns:
        the `UrlParameterBundle`

    - #### get

          public java.lang.String get(java.lang.String key)

      Returns the value of the parameter with the given key.
      Parameters:
        `key` - the key of the requested parameter
      Returns:
        the `String` value of the value

    - #### getDouble

          public double getDouble(java.lang.String key)

      Returns the value of the parameter with the given key.
      Parameters:
        `key` - the key of the requested parameter
      Returns:
        the `Double` value of the value

    - #### getInteger

          public int getInteger(java.lang.String key)

      Returns the value of the parameter with the given key.
      Parameters:
        `key` - the key of the requested parameter
      Returns:
        the `Integer` value of the value

    - #### getLong

          public long getLong(java.lang.String key)

      Returns the value of the parameter with the given key.
      Parameters:
        `key` - the key of the requested parameter
      Returns:
        the `Long` value of the value

    - #### getFloat

          public float getFloat(java.lang.String key)

      Returns the value of the parameter with the given key.
      Parameters:
        `key` - the key of the requested parameter
      Returns:
        the `Float` value of the value

    - #### getBoolean

          public boolean getBoolean(java.lang.String key)

      Returns the value of the parameter with the given key.
      Parameters:
        `key` - the key of the requested parameter
      Returns:
        the `Boolean` value of the value

    - #### generateUrlString

          public java.lang.String generateUrlString()

      Creates an URL encoded `String` containing all parameters of this `UrlParameterBundle` object.
      Returns:
        the generated String containing all parameters of this `UrlParameterBundle` object