Project Wonder 5.0

er.chronic.utils
Class Token

java.lang.Object
  extended by er.chronic.utils.Token

public class Token
extends java.lang.Object


Constructor Summary
Token(java.lang.String word)
           
 
Method Summary
<T extends Tag>
T
getTag(java.lang.Class<T> tagClass)
          Return the Tag that matches the given class
 java.util.List<Tag<?>> getTags()
           
<T extends Tag<?>>
java.util.List<T>
getTags(java.lang.Class<T> tagClass)
          Return the Tag that matches the given class
 java.lang.String getWord()
           
 boolean isTagged()
          Return true if this token has any tags
 void tag(Tag<?> newTag)
          Tag this token with the specified tag
 java.lang.String toString()
           
 void untag(java.lang.Class<?> tagClass)
          Remove all tags of the given class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Token

public Token(java.lang.String word)
Method Detail

getWord

public java.lang.String getWord()

tag

public void tag(Tag<?> newTag)
Tag this token with the specified tag


untag

public void untag(java.lang.Class<?> tagClass)
Remove all tags of the given class


isTagged

public boolean isTagged()
Return true if this token has any tags


getTag

public <T extends Tag> T getTag(java.lang.Class<T> tagClass)
Return the Tag that matches the given class


getTags

public java.util.List<Tag<?>> getTags()

getTags

public <T extends Tag<?>> java.util.List<T> getTags(java.lang.Class<T> tagClass)
Return the Tag that matches the given class


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.