Class TagModel
- java.lang.Object
-
- org.openstreetmap.josm.gui.tagging.TagModel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(String value)
adds a tag valuevoid
clearValues()
removes all values from the list of valuesString
getName()
returns the tag name (key).String
getValue()
returns the value(s) as stringint
getValueCount()
returns the number of valuesList<String>
getValues()
returns the list of valuesboolean
hasValue(String value)
determines if this tag model has a specific valuevoid
removeValue(String value)
removes a value from the list of values.void
setName(String name)
sets the name.void
setValue(String value)
sets a unique value for this tag.String
toString()
-
-
-
Method Detail
-
setName
public final void setName(String name)
sets the name. Converts name to "" if null.- Parameters:
name
- the tag name
-
clearValues
public void clearValues()
removes all values from the list of values
-
setValue
public final void setValue(String value)
sets a unique value for this tag. Converts value to "", if null.- Parameters:
value
- the value.
-
hasValue
public boolean hasValue(String value)
determines if this tag model has a specific 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(String value)
adds a tag value- Parameters:
value
- the value to add; converted to "" if null
-
removeValue
public void removeValue(String value)
removes a value from the list of values. Converts value to "" if null- Parameters:
value
- the value
-
getValue
public String getValue()
returns the value(s) as string- Returns:
- the value(s) as string, joined with a semicolon (;) if multiple values
-
getValueCount
public int getValueCount()
returns the number of values- Returns:
- the number of values
-
-