edu.neu.ccs.demeter
Class Line

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

public final class Line
extends Object
implements Serializable

A terminal class for parsing a full line. Put Line in a class dictionary to represent a full line in an input sentence, terminated by line.separator (which is not included in the Line object).

See Also:
Serialized Form

Field Summary
static String nl
          The line separator of the current JVM.
 
Constructor Summary
Line()
          Construct an empty line.
Line(Object obj)
          Construct a Line from an Object by converting it to a String with Object.toString().
Line(String s)
          Construct a Line from a String.
 
Method Summary
 boolean equals(Object line)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

nl

public static final String nl
The line separator of the current JVM. It is initialized from the line.separator system property.

See Also:
System.getProperty(String, String)
Constructor Detail

Line

public Line()
Construct an empty line.


Line

public Line(String s)
Construct a Line from a String. Note that a Line created outside of the parser is not constrained to be a single line.


Line

public Line(Object obj)
Construct a Line from an Object by converting it to a String with Object.toString(). Note that a Line created outside of the parser is not constrained to be a single line.

Method Detail

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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