|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openstreetmap.josm.data.osm.Tag
public class Tag
Tag represents an immutable key/value-pair. Both the key and the value may be empty, but not null.
| Field Summary | |
|---|---|
private java.lang.String |
key
|
private java.lang.String |
value
|
| Constructor Summary | |
|---|---|
Tag()
Create an empty tag whose key and value are empty. |
|
Tag(java.lang.String key)
Create a tag whose key is key and whose value is
empty. |
|
Tag(java.lang.String key,
java.lang.String value)
Creates a tag for a key and a value. |
|
Tag(Tag tag)
Creates clone of the tag tag. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getKey()
Replies the key of the tag. |
java.lang.String |
getValue()
Replies the value of the tag. |
int |
hashCode()
|
boolean |
matchesKey(java.lang.String key)
Replies true if the key of this tag is equal to key. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String key
private java.lang.String value
| Constructor Detail |
|---|
public Tag()
public Tag(java.lang.String key)
key and whose value is
empty.
key - the key. If null, it is set to the empty key.
public Tag(java.lang.String key,
java.lang.String value)
key - the keyvalue - the valuepublic Tag(Tag tag)
tag.
tag - the tag.| Method Detail |
|---|
public java.lang.String getKey()
public java.lang.String getValue()
public boolean matchesKey(java.lang.String key)
key.
If key is null, assumes the empty key.
key - the key
keypublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||