org.openstreetmap.josm.data.osm
Interface Tagged

All Known Subinterfaces:
INode, IPrimitive, IRelation, IWay
All Known Implementing Classes:
AbstractPrimitive, Changeset, Node, NodeData, OsmPrimitive, PrimitiveData, Relation, RelationData, Way, WayData

public interface Tagged

Objects implement Tagged if they provide a map of key/value pairs.


Method Summary
 java.lang.String get(java.lang.String key)
          Replies the value of the given key; null, if there is no value for this key
 java.util.Map<java.lang.String,java.lang.String> getKeys()
          Replies the map of key/value pairs.
 boolean hasKeys()
          Replies true, if there is at least one key/value pair; false, otherwise
 java.util.Collection<java.lang.String> keySet()
          Replies the set of keys
 void put(java.lang.String key, java.lang.String value)
          Sets a key/value pairs
 void remove(java.lang.String key)
          Removes a given key/value pair
 void removeAll()
          Removes all tags
 void setKeys(java.util.Map<java.lang.String,java.lang.String> keys)
          Sets the map of key/value pairs
 

Method Detail

setKeys

void setKeys(java.util.Map<java.lang.String,java.lang.String> keys)
Sets the map of key/value pairs

Parameters:
keys - the map of key value pairs. If null, reset to the empty map.

getKeys

java.util.Map<java.lang.String,java.lang.String> getKeys()
Replies the map of key/value pairs. Never null, but may be the empty map.

Returns:
the map of key/value pairs

put

void put(java.lang.String key,
         java.lang.String value)
Sets a key/value pairs

Parameters:
key - the key
value - the value. If null, removes the key/value pair.

get

java.lang.String get(java.lang.String key)
Replies the value of the given key; null, if there is no value for this key

Parameters:
key - the key
Returns:
the value

remove

void remove(java.lang.String key)
Removes a given key/value pair

Parameters:
key - the key

hasKeys

boolean hasKeys()
Replies true, if there is at least one key/value pair; false, otherwise

Returns:
true, if there is at least one key/value pair; false, otherwise

keySet

java.util.Collection<java.lang.String> keySet()
Replies the set of keys

Returns:
the set of keys

removeAll

void removeAll()
Removes all tags



JOSM