
public class Node<T> {
	private T data;
	private Node<T> next;
	private Node<T> prev;
	
	
	public Node(T data) {
		this.data = data;
	}


	public T getData() {
		return data;
	}


	public void setData(T data) {
		this.data = data;
	}


	public Node<T> getNext() {
		return next;
	}


	public void setNext(Node<T> next) {
		this.next = next;
	}


	public Node<T> getPrev() {
		return prev;
	}


	public void setPrev(Node<T> prev) {
		this.prev = prev;
	}


	@Override
	public String toString() {
		return "Node [data=" + data + "]";
	}
	
	public boolean equalTo(T o){
		if(this.data== o )
			return true;
		else
			return false;
		
	}



	public int compare(Node<T> data) {
		return this.toString().compareToIgnoreCase(data.toString());
			
	}

}
