/**
The Link class of objects.
@author Steve Rauch
modified by David Bremner
*/
class Link<T extends Comparable<T>> implements Comparable<Link<T>> {
private T data;
private Link<T> next;
public Link(T payload){
data=payload;
next=null;
}
public Link<T> getNext(){
return next;
}
public void setNext(Link<T> val){
next=val;
}
public T getData(){
return data;
}
public int compareTo(Link<T> other){
return getData().compareTo(other.getData());
}
}