org.jaudiotagger.tag.datatype
Class NumberHashMap
java.lang.Object
org.jaudiotagger.tag.datatype.AbstractDataType
org.jaudiotagger.tag.datatype.NumberFixedLength
org.jaudiotagger.tag.datatype.NumberHashMap
- All Implemented Interfaces:
- HashMapInterface<java.lang.Integer,java.lang.String>
public class NumberHashMap
- extends NumberFixedLength
- implements HashMapInterface<java.lang.Integer,java.lang.String>
Represents a number thats acts as a key into an enumeration of values
Field Summary |
private boolean |
hasEmptyValue
|
private java.util.Map<java.lang.Integer,java.lang.String> |
keyToValue
key to value map |
private java.util.Map<java.lang.String,java.lang.Integer> |
valueToKey
value to key map |
Method Summary |
boolean |
equals(java.lang.Object obj)
|
java.util.Map<java.lang.Integer,java.lang.String> |
getKeyToValue()
|
java.util.Map<java.lang.String,java.lang.Integer> |
getValueToKey()
|
java.util.Iterator<java.lang.String> |
iterator()
|
void |
readByteArray(byte[] arr,
int offset)
Read the key from the buffer. |
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()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
keyToValue
private java.util.Map<java.lang.Integer,java.lang.String> keyToValue
- key to value map
valueToKey
private java.util.Map<java.lang.String,java.lang.Integer> valueToKey
- value to key map
hasEmptyValue
private boolean hasEmptyValue
NumberHashMap
public NumberHashMap(java.lang.String identifier,
AbstractTagFrameBody frameBody,
int size)
- Creates a new ObjectNumberHashMap datatype.
- Parameters:
identifier
- frameBody
- size
-
- Throws:
java.lang.IllegalArgumentException
NumberHashMap
public NumberHashMap(NumberHashMap copyObject)
getKeyToValue
public java.util.Map<java.lang.Integer,java.lang.String> getKeyToValue()
- Specified by:
getKeyToValue
in interface HashMapInterface<java.lang.Integer,java.lang.String>
- Returns:
- the key to value map
getValueToKey
public java.util.Map<java.lang.String,java.lang.Integer> getValueToKey()
- Specified by:
getValueToKey
in interface HashMapInterface<java.lang.Integer,java.lang.String>
- Returns:
- the value to key map
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 NumberFixedLength
- Parameters:
value
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class NumberFixedLength
- Parameters:
obj
-
- Returns:
iterator
public java.util.Iterator<java.lang.String> iterator()
- Specified by:
iterator
in interface HashMapInterface<java.lang.Integer,java.lang.String>
- Returns:
readByteArray
public void readByteArray(byte[] arr,
int offset)
throws InvalidDataTypeException
- Read the key from the buffer.
- Overrides:
readByteArray
in class NumberFixedLength
- Parameters:
arr
- offset
-
- Throws:
InvalidDataTypeException
- if emptyValues are not allowed and the eky was invalid.
toString
public java.lang.String toString()
- Overrides:
toString
in class NumberFixedLength
- Returns: