6364656667686970717273
public String toString() { return avian.Data.toString(this); } public boolean add(T value) { PersistentSet.Path<Cell<T>> p = set.find(new Cell(value, null)); if (p.fresh()) { set = p.add(); return true; } return false;
727374757677787980818283848586
} return false; } T addAndReplace(T value) { PersistentSet.Path<Cell<T>> p = set.find(new Cell(value, null)); if (p.fresh()) { set = p.add(); return null; } else { T old = p.value().value; set = p.replaceWith(new Cell(value, null)); return old; } }
8485868788899091
return old; } } T find(T value) { PersistentSet.Path<Cell<T>> p = set.find(new Cell(value, null)); return p.fresh() ? null : p.value().value; }
949596979899100101102103104
Cell<T> cell = removeCell(value); return cell == null ? null : cell.value; } private Cell<T> removeCell(Object value) { PersistentSet.Path<Cell<T>> p = set.find(new Cell(value, null)); if (p.fresh()) { return null; } else { Cell<T> old = p.value();
123124125126127128129
public boolean isEmpty() { return set.size() == 0; } public boolean contains(Object value) { return !set.find(new Cell(value, null)).fresh(); }
2021222324252627
public ThreadGroup(ThreadGroup parent, String name) { this.parent = parent; this.name = name; synchronized (parent) { parent.subgroups = new Cell(this, subgroups); } }