mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
25 lines
462 B
Java
25 lines
462 B
Java
package java.util;
|
|
|
|
public class Cell <T> {
|
|
public T value;
|
|
public Cell<T> next;
|
|
|
|
public Cell(T value, Cell<T> next) {
|
|
this.value = value;
|
|
this.next = next;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("(");
|
|
for (Cell c = this; c != null; c = c.next) {
|
|
sb.append(value);
|
|
if (c.next != null) {
|
|
sb.append(" ");
|
|
}
|
|
}
|
|
sb.append(")");
|
|
return sb.toString();
|
|
}
|
|
}
|