|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.eos.analyzer.AbstractToken
public abstract class AbstractToken
Simple implementation for reuse.
Field Summary |
---|
Fields inherited from interface net.sf.eos.analyzer.Token |
---|
DEFAULT_TYPE |
Constructor Summary | |
---|---|
AbstractToken(CharSequence tokenSequence)
Creates a new token for the given sequence. |
|
AbstractToken(CharSequence tokenSequence,
Map<String,List<String>> metadata)
|
|
AbstractToken(CharSequence tokenSequence,
String type)
|
|
AbstractToken(CharSequence tokenSequence,
String type,
Map<String,List<String>> metadata)
Creates a new token for the given sequence for a special type. |
|
AbstractToken(Token t)
Copy constuctor. |
Method Summary | |
---|---|
Map<String,List<String>> |
getMeta()
Returns simple metadata. |
CharSequence |
getTokenText()
Returns the text of a token. |
String |
getType()
Returns the type of the token. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractToken(CharSequence tokenSequence)
getType()
returns
the Token.DEFAULT_TYPE
.
tokenSequence
- the char sequence of the token. May not be
null
.
IllegalArgumentException
- if tokenSequence is
null
public AbstractToken(CharSequence tokenSequence, Map<String,List<String>> metadata)
public AbstractToken(CharSequence tokenSequence, String type)
public AbstractToken(Token t)
t
- the token to copy.public AbstractToken(CharSequence tokenSequence, String type, Map<String,List<String>> metadata)
tokenSequence
- the char sequence of the token. May not be
null
.type
- the type of the token. May not be null
.
IllegalArgumentException
- if tokenSequence or
type are null
Method Detail |
---|
public CharSequence getTokenText()
Token
getTokenText
in interface Token
Token.getTokenText()
public String getType()
Token
getType
in interface Token
Token.getType()
public Map<String,List<String>> getMeta()
Metadata
getMeta
in interface Metadata
null
.Metadata.getMeta()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |