29 lines
519 B
Java
29 lines
519 B
Java
package appointmentplanner.customlist;
|
|
|
|
public class CustomLinkedListNode<T> {
|
|
private T item;
|
|
private CustomLinkedListNode<T> next;
|
|
|
|
public CustomLinkedListNode(CustomLinkedListNode<T> next, T item) {
|
|
this.next = next;
|
|
this.item = item;
|
|
}
|
|
|
|
public CustomLinkedListNode(T item) {
|
|
this(null, item);
|
|
}
|
|
|
|
public T getItem() {
|
|
return item;
|
|
}
|
|
|
|
public CustomLinkedListNode<T> getNext() {
|
|
return next;
|
|
}
|
|
|
|
public void setNext(CustomLinkedListNode<T> next) {
|
|
this.next = next;
|
|
}
|
|
|
|
}
|