src/NonTerminalTree.java
public final int compare(NonTerminalTree a, NonTerminalTree b) {
            if (a.sentence.length() != b.sentence.length())
                return a.sentence.length() - b.sentence.length();
            if (! a.sentence.equals(b.sentence))
                return a.sentence.compareTo(b.sentence);
            return a.height() - b.height();
        }
/** Trees are ordered first by length, then by generated sentence. */
Trees are ordered first by length, then by generated sentence.
Trees are ordered first by length then by generated sentence .
public final int compare(NonTerminalTree a, NonTerminalTree b) {
            if (a.sentence.length() != b.sentence.length())
                return a.sentence.length() - b.sentence.length();
            if (! a.sentence.equals(b.sentence))
                return a.sentence.compareTo(b.sentence);
            return a.height() - b.height();
        }
public final int compare ( NonTerminalTree a , NonTerminalTree b ) { if ( a . sentence . length ( ) != b . sentence . length ( ) ) return a . sentence . length ( ) - b . sentence . length ( ) ; if ( ! a . sentence . equals ( b . sentence ) ) return a . sentence . compareTo ( b . sentence ) ; return a . height ( ) - b . height ( ) ; }
Trees are ordered first by length, then by generated sentence.
Trees are ordered first by length then by generated sentence .