package de.ostfalia.algo.ws18.s1; /** * A generic linked list node. * * @param The type of the value this node contains. */ public class LinkedListNode { /** * This node's value. */ private E value; /** * The next linked node. */ private LinkedListNode next; /** * Create a node with the given value and no next node. * * @param value This node's value. */ public LinkedListNode(E value) { this.value = value; this.next = null; } /** * Get this node's value. * * @return This node's value. */ public E getValue() { return this.value; } /** * Set this node's value. * * @param value The new value. */ public void setValue(E value) { this.value = value; } /** * Get the next linked node. * * @return The next linked node. */ public LinkedListNode getNext() { return this.next; } /** * Set the next linked node. * * @param next */ public void setNext(LinkedListNode next) { this.next = next; } }