org.jaudiotagger.tag.datatype
Class StringHashMap

java.lang.Object
  extended by org.jaudiotagger.tag.datatype.AbstractDataType
      extended by org.jaudiotagger.tag.datatype.AbstractString
          extended by org.jaudiotagger.tag.datatype.StringFixedLength
              extended by org.jaudiotagger.tag.datatype.StringHashMap
All Implemented Interfaces:
HashMapInterface<java.lang.String,java.lang.String>

public class StringHashMap
extends StringFixedLength
implements HashMapInterface<java.lang.String,java.lang.String>

Represents a String thats acts as a key into an enumeration of values. The String will be encoded using the default encoding regardless of what encoding may be specified in the framebody


Field Summary
(package private)  boolean hasEmptyValue
           
(package private)  java.util.Map<java.lang.String,java.lang.String> keyToValue
           
(package private)  java.util.Map<java.lang.String,java.lang.String> valueToKey
           
 
Fields inherited from class org.jaudiotagger.tag.datatype.AbstractDataType
frameBody, identifier, logger, size, TYPE_ELEMENT, value
 
Constructor Summary
StringHashMap(java.lang.String identifier, AbstractTagFrameBody frameBody, int size)
          Creates a new ObjectStringHashMap datatype.
StringHashMap(StringHashMap copyObject)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.Map<java.lang.String,java.lang.String> getKeyToValue()
           
protected  java.lang.String getTextEncodingCharSet()
           
 java.util.Map<java.lang.String,java.lang.String> getValueToKey()
           
 java.util.Iterator<java.lang.String> iterator()
           
 void setValue(java.lang.Object value)
          Set the value held by this datatype, this is used typically used when the user wants to modify the value in an existing frame.
 java.lang.String toString()
          Return String representation of datatype
 
Methods inherited from class org.jaudiotagger.tag.datatype.StringFixedLength
readByteArray, writeByteArray
 
Methods inherited from class org.jaudiotagger.tag.datatype.AbstractString
canBeEncoded, getSize, setSize
 
Methods inherited from class org.jaudiotagger.tag.datatype.AbstractDataType
createStructure, getBody, getIdentifier, getValue, readByteArray, setBody
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

keyToValue

java.util.Map<java.lang.String,java.lang.String> keyToValue

valueToKey

java.util.Map<java.lang.String,java.lang.String> valueToKey

hasEmptyValue

boolean hasEmptyValue
Constructor Detail

StringHashMap

public StringHashMap(java.lang.String identifier,
                     AbstractTagFrameBody frameBody,
                     int size)
Creates a new ObjectStringHashMap datatype.

Parameters:
identifier -
frameBody -
size -
Throws:
java.lang.IllegalArgumentException

StringHashMap

public StringHashMap(StringHashMap copyObject)
Method Detail

getKeyToValue

public java.util.Map<java.lang.String,java.lang.String> getKeyToValue()
Specified by:
getKeyToValue in interface HashMapInterface<java.lang.String,java.lang.String>
Returns:

getValueToKey

public java.util.Map<java.lang.String,java.lang.String> getValueToKey()
Specified by:
getValueToKey in interface HashMapInterface<java.lang.String,java.lang.String>
Returns:

setValue

public void setValue(java.lang.Object value)
Description copied from class: AbstractDataType
Set the value held by this datatype, this is used typically used when the user wants to modify the value in an existing frame.

Overrides:
setValue in class AbstractDataType
Parameters:
value -

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class StringFixedLength
Parameters:
obj -
Returns:

iterator

public java.util.Iterator<java.lang.String> iterator()
Specified by:
iterator in interface HashMapInterface<java.lang.String,java.lang.String>
Returns:

toString

public java.lang.String toString()
Description copied from class: AbstractString
Return String representation of datatype

Overrides:
toString in class AbstractString
Returns:

getTextEncodingCharSet

protected java.lang.String getTextEncodingCharSet()
Overrides:
getTextEncodingCharSet in class StringFixedLength
Returns:
the ISO_8859 encoding for Datatypes of this type