jfun.parsec.tokens
Class TokenQuoted

java.lang.Object
  extended by jfun.parsec.tokens.TokenQuoted
All Implemented Interfaces:
java.io.Serializable

public class TokenQuoted
extends java.lang.Object
implements java.io.Serializable

represents a string that is quoted by a open and close string. Use this token if the value of open quote and close quote matters to the syntax.

Author:
Ben Yu 2004-11-15
See Also:
Serialized Form

Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getClose()
          Returns the closing quote.
 java.lang.String getOpen()
          Returns the opening quote.
 java.lang.String getQuoted()
          Returns the quoted text.
static Tokenizer getTokenizer(char open, char close)
          Deprecated. Use Tokenizers.forQuotedString(char, char) instead.
static Tokenizer getTokenizer(java.lang.String open, java.lang.String close)
          Deprecated. Use Tokenizers.forQuotedString(String, String) instead.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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

getTokenizer

public static Tokenizer getTokenizer(char open,
                                     char close)
Deprecated. Use Tokenizers.forQuotedString(char, char) instead.

creates a Tokenizer instance that can parse a string quoted by open and close.

Parameters:
open - the open quote
close - the close quote
Returns:
the tokenizer.

getTokenizer

public static Tokenizer getTokenizer(java.lang.String open,
                                     java.lang.String close)
Deprecated. Use Tokenizers.forQuotedString(String, String) instead.

creates a Tokenizer instance that can parse a string quoted by open and close.

Parameters:
open - the opening quote
close - the closeing quote
Returns:
the tokenizer.

getClose

public final java.lang.String getClose()
Returns the closing quote.

Returns:
the closing quote

getQuoted

public final java.lang.String getQuoted()
Returns the quoted text.

Returns:
the quoted text

getOpen

public final java.lang.String getOpen()
Returns the opening quote.

Returns:
the opening quote