org.openstreetmap.josm.plugins.graphview.core.data
Interface TagGroup

All Superinterfaces:
Iterable<Tag>
All Known Implementing Classes:
EmptyTagGroup, MapBasedTagGroup

public interface TagGroup
extends Iterable<Tag>

represents a group of OSM tags (e.g. all tags of a way). TagGroups are expected to be immutable, so modifying the tags means creation of a new group. This interface requires that keys are unique, which is guaranteed since OSM API 0.6.


Method Summary
 boolean contains(String key, String value)
          returns true if this tag group contains the tag
 boolean contains(Tag tag)
          returns true if this tag group contains the given tag
 boolean containsKey(String key)
          returns true if this tag group contains a tag with the given key
 boolean containsValue(String value)
          returns true if this tag group contains at least one tag with the given value
 String getValue(String key)
          returns the value for the given key or null if no tag in this group uses that key
 boolean isEmpty()
          returns true if this group contains any tags
 int size()
          returns the number of tags in this group
 
Methods inherited from interface Iterable
iterator
 

Method Detail

getValue

String getValue(String key)
returns the value for the given key or null if no tag in this group uses that key

Parameters:
key - key whose value will be returned; != null

containsKey

boolean containsKey(String key)
returns true if this tag group contains a tag with the given key

Parameters:
key - key to check for; != null

containsValue

boolean containsValue(String value)
returns true if this tag group contains at least one tag with the given value

Parameters:
value - value to check for; != null

contains

boolean contains(Tag tag)
returns true if this tag group contains the given tag

Parameters:
tag - tag to check for; != null

contains

boolean contains(String key,
                 String value)
returns true if this tag group contains the tag

Parameters:
key - key of the tag to check for; != null
value - value of the tag to check for; != null

size

int size()
returns the number of tags in this group


isEmpty

boolean isEmpty()
returns true if this group contains any tags