Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package jasonandrewsca3;
- public class Node<E>
- {
- private E value;
- public Node current;
- public Node<E> prev;
- public Object data;
- public Node<E> next;
- public Node(){
- }
- public Node(E value) {
- this.value = value;
- }
- public Node(E value, Node<E> prev, Node<E> next) {
- this.value = value;
- setPrev(prev);
- setNext(next);
- }
- void setPrev(Node<E> prev) {
- this.prev = prev;
- }
- void setNext(Node<E> next) {
- this.next = next;
- }
- void previous(Node<E> prev) {
- this.prev = prev;
- }
- void next(Node<E> next) {
- this.next = next;
- }
- Node<E> getPrev() {
- return prev;
- }
- Node<E> getNext() {
- return next;
- }
- E getValue() {
- return value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement