Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## things.data
Class AttributeCodec

    java.lang.Object
      things.data.AttributeCodec

    public class AttributeCodec

extends java.lang.Object

Defines standard methods for encoding and decoding attributes as other data types. All are static methods.

||name=value|va\|lue||n\=ame=value||name=valu\\e|value|val\=ue

Version:
  1.0

  Version History

      EPG - Initial - 13 JAN 05

Author:
  Erich P. Gatejen

Constructor Summary
`AttributeCodec()`

Method Summary
`static java.util.HashMap<java.lang.String,java.lang.String>` | `encode2Map(java.util.HashMap<java.lang.String,java.lang.String> existing, java.lang.String... a)` Encode a collection of String that represent an .
`static java.lang.String` | `encode2String(java.util.Collection<NVImmutable> c)` Encode a collection of s to a string.
`static java.lang.String` | `encode2String(java.util.Map<java.lang.String,java.lang.String> c)` Encode a hashtable of String,String pairs.
`static java.lang.String` | `encode2String(NVImmutable... a)` Encode a collection of s to a string.
`static java.lang.String` | `encode2String(NVImmutable a)` Encode a single NV object.
`static java.lang.String` | `encode2String(java.lang.String... a)` Encode a collection of String that represent an .

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AttributeCodec

    public AttributeCodec()

Method Detail

### encode2String

    public static java.lang.String encode2String(NVImmutable... a)
                                          throws ThingsException

  Encode a collection of s to a string.

  Parameters:
    `a` - An array of s.
  Returns:
    the encoded string
  Throws:
    `ThingsException`

### encode2String

    public static java.lang.String encode2String(NVImmutable a)
                                          throws ThingsException

  Encode a single NV object.

  Parameters:
    `a` - the NV
  Returns:
    the encoded string
  Throws:
    `ThingsException`

### encode2String

    public static java.lang.String encode2String(java.lang.String... a)
                                          throws ThingsException

  Encode a collection of String that represent an .

  Parameters:
    `a` - An arracy of Strings.
  Returns:
    the encoded string
  Throws:
    `ThingsException`

### encode2String

    public static java.lang.String encode2String(java.util.Collection<NVImmutable> c)
                                          throws ThingsException

  Encode a collection of s to a string.

  Parameters:
    `c` - the collection
  Returns:
    the encoded string
  Throws:
    `ThingsException`

### encode2String

    public static java.lang.String encode2String(java.util.Map<java.lang.String,java.lang.String> c)
                                          throws ThingsException

  Encode a hashtable of String,String pairs.

  Parameters:
    `c` - the map
  Returns:
    the encoded string
  Throws:
    `ThingsException`

### encode2Map

    public static java.util.HashMap<java.lang.String,java.lang.String> encode2Map(java.util.HashMap<java.lang.String,java.lang.String> existing,
                                                                                  java.lang.String... a)

  Encode a collection of String that represent an .

  Parameters:
    `a` - An arracy of Strings.
    `existing` - The existing map of attributes. Passing null will create a new one.
  Returns:
    the encoded string

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Things.