FileDocCategorySizeDatePackage
AbstractIntStringValuePair.javaAPI DocJaudiotagger 2.0.42072Wed Mar 30 16:12:12 BST 2011org.jaudiotagger.tag.datatype

AbstractIntStringValuePair

public class AbstractIntStringValuePair extends AbstractValuePair
A two way mapping between an Integral Id and a String value

Fields Summary
protected Integer
key
Constructors Summary
Methods Summary
protected voidcreateMaps()

        //Create the reverse the map
        for (Map.Entry<Integer, String> entry : idToValue.entrySet())
        {
            valueToId.put(entry.getValue(), entry.getKey());
        }

        //Value List sort alphabetically
        valueList.addAll(idToValue.values());
        Collections.sort(valueList);
    
public java.lang.IntegergetIdForValue(java.lang.String value)
Get Id for Value

param
value
return


                
       
    
        return valueToId.get(value);
    
public java.lang.StringgetValueForId(int id)
Get value for Id

param
id
return

        return idToValue.get(id);