edu.neu.ccs.demeter
Class Text

java.lang.Object
  |
  +--edu.neu.ccs.demeter.Text
All Implemented Interfaces:
Serializable

public final class Text
extends Object
implements Serializable

A terminal class for parsing a block of arbitrary text. Put Text in a class dictionary to represent a block of text in an input sentence, surrounded by begin and end.

See Also:
Serialized Form

Field Summary
static String begin
          The beginning marker for the text block in an input sentence.
static String end
          The end marker for the text block in an input sentence.
static String quoted_end
          Java code for the end marker for the text block in an input sentence.
 
Constructor Summary
Text()
          Construct an empty text block.
Text(Object obj)
          Construct a Text from an Object by converting it to a String with Object.toString().
Text(String s)
          Construct a Text from a String.
 
Method Summary
 boolean equals(Object text)
           
 int hashCode()
           
 String toString()
          The body of the text block, not including the begin and end markers.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

begin

public static final String begin
The beginning marker for the text block in an input sentence.

See Also:
Constant Field Values

end

public static final String end
The end marker for the text block in an input sentence.

See Also:
Constant Field Values

quoted_end

public static final String quoted_end
Java code for the end marker for the text block in an input sentence.

See Also:
Constant Field Values
Constructor Detail

Text

public Text()
Construct an empty text block.


Text

public Text(String s)
Construct a Text from a String.


Text

public Text(Object obj)
Construct a Text from an Object by converting it to a String with Object.toString().

Method Detail

toString

public String toString()
The body of the text block, not including the begin and end markers.

Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object text)
Overrides:
equals in class Object