Class TagModel
java.lang.Object
org.openstreetmap.josm.gui.tagging.TagModel
Tag model.
- Since:
- 1762
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadds a tag valuevoidremoves all values from the list of valuesgetName()returns the tag name (key).getValue()returns the value(s) as stringintreturns the number of valuesreturns the list of valuesbooleandetermines if this tag model has a specific valuevoidremoveValue(String value) removes a value from the list of values.final voidsets the name.final voidsets a unique value for this tag.toString()
-
Field Details
-
name
the name of the tag -
values
the list of values
-
-
Constructor Details
-
TagModel
public TagModel()constructor -
TagModel
constructor- Parameters:
name- the tag name
-
TagModel
constructor- Parameters:
name- the tag namevalue- the tag value
-
-
Method Details
-
setName
sets the name. Converts name to "" if null.- Parameters:
name- the tag name
-
getName
returns the tag name (key).- Returns:
- the tag name
-
clearValues
removes all values from the list of values -
setValue
sets a unique value for this tag. Converts value to "", if null.- Parameters:
value- the value.
-
hasValue
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
adds a tag value- Parameters:
value- the value to add; converted to "" if null
-
removeValue
removes a value from the list of values. Converts value to "" if null- Parameters:
value- the value
-
getValues
returns the list of values- Returns:
- the list of values
-
getValue
returns the value(s) as string- Returns:
- the value(s) as string, joined with a semicolon (;) if multiple values
-
getValueCount
returns the number of values- Returns:
- the number of values
-
toString
-