public class Token extends Object
Modifier and Type | Method and Description |
---|---|
<T extends Tag> |
getTag(Class<T> tagClass)
Return the Tag that matches the given class
|
List<Tag<?>> |
getTags() |
<T extends Tag<?>> |
getTags(Class<T> tagClass)
Return the Tag that matches the given class
|
String |
getWord() |
boolean |
isTagged()
Return true if this token has any tags
|
void |
tag(Tag<?> newTag)
Tag this token with the specified tag
|
String |
toString() |
void |
untag(Class<?> tagClass)
Remove all tags of the given class
|
public Token(String word)
public String getWord()
public void tag(Tag<?> newTag)
public void untag(Class<?> tagClass)
public boolean isTagged()
public <T extends Tag> T getTag(Class<T> tagClass)
public <T extends Tag<?>> List<T> getTags(Class<T> tagClass)
Copyright © 2002 – 2020 Project Wonder.