impl: custom linked list node

This commit is contained in:
Václav Přibík
2025-10-16 15:08:18 +02:00
parent 9eeaa6ae53
commit e1a480610c

View File

@@ -0,0 +1,28 @@
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;
}
}