// Copyright (C) 2002 -- See your tutor for details // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. public class Node extends Object { private Object item; private Node next; public Node() { this(null,null); } public Node(Object newItem) { super(); item = newItem; next = null; } public Node(Object newItem, Node nextNode) { super(); item = newItem; next = nextNode; } public void setItem(Object newItem) { item = newItem; } public Object getItem() { return item; } public void setNext(Node nextNode) { next = nextNode; } public Node getNext() { return next; } }