de.dfki.lt.tools.tokenizer.output
Class Token

java.lang.Object
  extended byde.dfki.lt.tools.tokenizer.output.Token

public class Token
extends java.lang.Object

This represents a token with its type and surface image.

Version:
$Id: Token.java,v 1.3 2005/04/12 08:47:38 steffen Exp $
Author:
Joerg Steffen, DFKI

Constructor Summary
Token()
          This creates a new instance of Token.
Token(int aStartIndex, int anEndIndex, java.lang.String aType, java.lang.String anImage)
          This creates a new instance of Token with the given start index, end index, type and surface image of the token.
 
Method Summary
 int getEndIndex()
          This returns the end index of the token.
 java.lang.String getImage()
          This returns the surface image of the token.
 int getStartIndex()
          This returns the start index of the token.
 java.lang.String getType()
          This returns the type of the token.
 void setEndIndex(int anEndIndex)
          This sets the end index of the token to anEndIndex.
 void setImage(java.lang.String anImage)
          This sets the surface image of the token to anImage.
 void setStartIndex(int aStartIndex)
          This sets the start index of the token to aStartIndex.
 void setType(java.lang.String aType)
          This sets the type of the token to aType.
 java.lang.String toString()
          This returns a string representation of the token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Token

public Token()
This creates a new instance of Token.


Token

public Token(int aStartIndex,
             int anEndIndex,
             java.lang.String aType,
             java.lang.String anImage)
This creates a new instance of Token with the given start index, end index, type and surface image of the token.

Parameters:
aStartIndex - a int with the start index
anEndIndex - a int with the end index
aType - a String with the type
anImage - a String with the surface image
Method Detail

getStartIndex

public int getStartIndex()
This returns the start index of the token.

Returns:
an int

setStartIndex

public void setStartIndex(int aStartIndex)
This sets the start index of the token to aStartIndex.

Parameters:
aStartIndex - an int

getEndIndex

public int getEndIndex()
This returns the end index of the token.

Returns:
an int

setEndIndex

public void setEndIndex(int anEndIndex)
This sets the end index of the token to anEndIndex.

Parameters:
anEndIndex - an int

getType

public java.lang.String getType()
This returns the type of the token.

Returns:
a String

setType

public void setType(java.lang.String aType)
This sets the type of the token to aType.

Parameters:
aType - a String

getImage

public java.lang.String getImage()
This returns the surface image of the token.

Returns:
a String

setImage

public void setImage(java.lang.String anImage)
This sets the surface image of the token to anImage.

Parameters:
anImage - a String

toString

public java.lang.String toString()
This returns a string representation of the token.

Returns:
a String