Package com.graphhopper.reader
Class ReaderElement
java.lang.Object
com.graphhopper.reader.ReaderElement
- Direct Known Subclasses:
OSMFileHeader
,ReaderNode
,ReaderRelation
,ReaderWay
Base class for all network objects
- Author:
- Nop, Peter
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ReaderElement
(long id, ReaderElement.Type type) protected
ReaderElement
(long id, ReaderElement.Type type, Map<String, Object> properties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
getFirstIndex
(List<String> searchedTags) getFirstValue
(List<String> searchedTags) Returns the first existing value of the specified list of keys where the order is important.long
getId()
<T> T
getTags()
getType()
boolean
Check that the object has a given tag with a given value.boolean
Check that a given tag has one of the specified values.final boolean
hasTag
(String key, Collection<String> values) Check that a given tag has one of the specified values.boolean
Check a number of tags in the given order if their value is equal to the specified value.boolean
hasTag
(List<String> keyList, Collection<String> values) Check a number of tags in the given order for any of the given values.boolean
hasTags()
void
void
void
protected String
toString()
-
Constructor Details
-
ReaderElement
-
ReaderElement
-
-
Method Details
-
getId
public long getId() -
tagsToString
-
getTags
-
setTags
-
hasTags
public boolean hasTags() -
getTag
-
getTag
-
setTag
-
hasTag
Check that the object has a given tag with a given value. -
hasTag
Check that a given tag has one of the specified values. If no values are given, just checks for presence of the tag -
hasTag
Check that a given tag has one of the specified values. -
hasTag
Check a number of tags in the given order for any of the given values. -
hasTag
Check a number of tags in the given order if their value is equal to the specified value. -
getFirstValue
Returns the first existing value of the specified list of keys where the order is important.- Returns:
- an empty string if nothing found
-
getFirstIndex
- Returns:
- -1 if not found
-
removeTag
-
clearTags
public void clearTags() -
getType
-
toString
-