org.openstreetmap.josm.gui.tagging
Class TagModel

java.lang.Object
  extended by org.openstreetmap.josm.gui.tagging.TagModel

public class TagModel
extends java.lang.Object


Field Summary
private  java.lang.String name
          the name of the tag
private  java.util.ArrayList<java.lang.String> values
          the list of values
 
Constructor Summary
TagModel()
          constructor
TagModel(java.lang.String name)
          constructor
TagModel(java.lang.String name, java.lang.String value)
          constructor
 
Method Summary
 void addValue(java.lang.String value)
           
 void clearValues()
          removes all values from the list of values
 java.lang.String getName()
           
 java.lang.String getValue()
           
 int getValueCount()
           
 java.util.List<java.lang.String> getValues()
           
 boolean hasValue(java.lang.String value)
           
 void removeValue(java.lang.String value)
          removes a value from the list of values.
 void setName(java.lang.String name)
          sets the name.
 void setValue(java.lang.String value)
          sets a unique value for this tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name
the name of the tag


values

private java.util.ArrayList<java.lang.String> values
the list of values

Constructor Detail

TagModel

public TagModel()
constructor


TagModel

public TagModel(java.lang.String name)
constructor

Parameters:
name - the tag name

TagModel

public TagModel(java.lang.String name,
                java.lang.String value)
constructor

Parameters:
name - the tag name
value - the tag value
Method Detail

setName

public void setName(java.lang.String name)
sets the name. Converts name to "" if null.

Parameters:
name - the tag name

getName

public java.lang.String getName()
Returns:
the tag name

clearValues

public void clearValues()
removes all values from the list of values


setValue

public void setValue(java.lang.String value)
sets a unique value for this tag. Converts value to "", if null.

Parameters:
value - the value.

hasValue

public boolean hasValue(java.lang.String value)
Parameters:
value - the value to be checked; converted to "" if null
Returns:
true, if the values of this tag include value; false otherwise

addValue

public void addValue(java.lang.String value)

removeValue

public void removeValue(java.lang.String value)
removes a value from the list of values. Converts value to "" if null

Parameters:
value - the value

getValues

public java.util.List<java.lang.String> getValues()

getValue

public java.lang.String getValue()

getValueCount

public int getValueCount()


JOSM