UNB/ CS/ David Bremner/ teaching/ java/ ComparableNode.java
class ComparableNode implements
                         Comparable<ComparableNode> {
    private Comparable data;
    private ComparableNode next;
    public ComparableNode(Comparable comp){
        data=comp;
        next=null;
    }
    public ComparableNode getNext(){
        return next;
    }

    public void setNext(ComparableNode val){
        next=val;
    }

    public Comparable getData(){
        return data;
    }
    public int compareTo(ComparableNode other){
        return data.compareTo(other.data);
    }
}