This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
jgraph/Node.java

40 lines
618 B
Java

public class Node
{
private Object item;
private Node next; //reference to another node
public Node(Object item)
{
this.item = item;
next = null;
} // end constructor
public Node(Object item, Node next)
{
this.item = item;
this.next = next;
} // end constructor
public void setItem(Object item)
{
this.item = item;
} // end setItem
public Object getItem()
{
return item;
} // end getItem
public void setNext(Node next)
{
this.next = next;
} // end setNext
public Node getNext()
{
return next;
} // end getNext
} // end class Node