poetix

this time for sure

Christmas Carols in Java

public abstract class Tree implements Comparable<Tree> {

public int compareTo(Tree that) {

if (this instanceof Holly) {

if (that instanceof Holly) {

return 0;

} else {

return 1;

}

} else if (that instanceof Holly)

return -1;

} else {

return 0; // All other trees are equal, as per noble law

}

}

}