package OT; /** * Represents alignment direction (left or right). * @version 1998-6-6 * @see Align * @author Andrea Heiberg, University of Arizona */ public class Direction { private String direction = new String(); public Direction(String direction) { if (direction.equalsIgnoreCase(new String("left"))) { this.direction = new String("left"); } else if (direction.equalsIgnoreCase(new String("right"))) { this.direction = new String("right"); } else { this.direction = new String(); } //end if } //end constructor public String toString() { return direction; } //end toString public boolean equals(Direction d) { return direction.equals(d.toString()); } //end compareTo } //end class