public abstract class ReaderElement extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ReaderElement.Type |
Modifier | Constructor and Description |
---|---|
protected |
ReaderElement(long id,
ReaderElement.Type type) |
protected |
ReaderElement(long id,
ReaderElement.Type type,
Map<String,Object> properties) |
Modifier and Type | Method and Description |
---|---|
void |
clearTags() |
String |
getFirstPriorityTag(List<String> restrictions)
Returns the first existing tag of the specified list where the order is important.
|
long |
getId() |
List<String> |
getKeysWithPrefix(String keyPrefix) |
String |
getTag(String name) |
<T> T |
getTag(String key,
T defaultValue) |
Map<String,Object> |
getTags() |
ReaderElement.Type |
getType() |
boolean |
hasTag(List<String> keyList,
Collection<String> values)
Check a number of tags in the given order for the any of the given values.
|
boolean |
hasTag(String key,
Collection<String> values)
Check that a given tag has one of the specified values.
|
boolean |
hasTag(String key,
Object value)
Check that the object has a given tag with a given value.
|
boolean |
hasTag(String key,
String... values)
Check that a given tag has one of the specified values.
|
boolean |
hasTags() |
boolean |
hasTagWithKeyPrefix(String keyPrefix) |
boolean |
isType(ReaderElement.Type type) |
void |
removeTag(String name) |
void |
setTag(String name,
Object value) |
void |
setTags(Map<String,String> newTags) |
protected String |
tagsToString() |
String |
toString() |
protected ReaderElement(long id, ReaderElement.Type type)
protected ReaderElement(long id, ReaderElement.Type type, Map<String,Object> properties)
public long getId()
protected String tagsToString()
public boolean hasTags()
public <T> T getTag(String key, T defaultValue)
public boolean hasTag(String key, Object value)
public boolean hasTag(String key, String... values)
public final boolean hasTag(String key, Collection<String> values)
public boolean hasTag(List<String> keyList, Collection<String> values)
public boolean hasTagWithKeyPrefix(String keyPrefix)
public String getFirstPriorityTag(List<String> restrictions)
public void removeTag(String name)
public void clearTags()
public ReaderElement.Type getType()
public boolean isType(ReaderElement.Type type)
Copyright © 2012–2022. All rights reserved.