APL/DEV 3.2/TP03/Chaine/ChainLink.java

28 lines
430 B
Java
Raw Normal View History

2022-10-20 12:49:09 +02:00
/**
* ChainLink
*/
public class ChainLink<T> {
private T value;
2022-10-21 16:11:26 +02:00
private ChainLink<T> next;
public ChainLink(T t) {
this.value = t;
}
2022-10-20 12:49:09 +02:00
public T getValue() {
return value;
}
public void setValue(T value) {
this.value = value;
}
2022-10-21 16:11:26 +02:00
public ChainLink<T> getNext() {
2022-10-20 12:49:09 +02:00
return next;
}
2022-10-21 16:11:26 +02:00
public void setNext(ChainLink<T> next) {
2022-10-20 12:49:09 +02:00
this.next = next;
}
}