gov.llnl.babel.url.cookie

Class Token


public final class Token
extends java.lang.Object

A class to store each lexical token discovered while parsing the cookie.

Field Summary

static int
s_COMMA
A comma
static int
s_END_OF_STREAM
Indicate the end of the stream
static int
s_EQUAL
An equal character
static int
s_QUOTED
A quoted string
static int
s_SEMICOLON
A semicolon
static int
s_TOKEN
An identifier (informally a sequence of non-special, non-white space characters).

Constructor Summary

Token(int type, String text)
Create a token

Method Summary

String
getText()
Return the text of the token.
int
getType()
Return one of the constants defined above to indicate the type of the token.

Field Details

s_COMMA

public static final int s_COMMA
A comma
Field Value:
44

s_END_OF_STREAM

public static final int s_END_OF_STREAM
Indicate the end of the stream
Field Value:
0

s_EQUAL

public static final int s_EQUAL
An equal character
Field Value:
61

s_QUOTED

public static final int s_QUOTED
A quoted string
Field Value:
2

s_SEMICOLON

public static final int s_SEMICOLON
A semicolon
Field Value:
59

s_TOKEN

public static final int s_TOKEN
An identifier (informally a sequence of non-special, non-white space characters).
Field Value:
1

Constructor Details

Token

public Token(int type,
             String text)
Create a token

Method Details

getText

public String getText()
Return the text of the token.

getType

public int getType()
Return one of the constants defined above to indicate the type of the token.