public void remove(LeftTuple tuple) { LeftTupleList list = tuple.getMemory(); list.remove(tuple); if (list.getFirst() == null) { tree.delete(((Node<Comparable<Comparable>>) list).key); } size--; }
public Entry[] toArray() { FastIterator it = tree.fastIterator(); if (it == null) { return new Entry[0]; } List<Comparable> toBeRemoved = new ArrayList<Comparable>(); List<LeftTuple> result = new ArrayList<LeftTuple>(); LeftTupleList list = null; while ((list = (LeftTupleList) it.next(list)) != null) { LeftTuple entry = list.getFirst(); while (entry != null) { result.add(entry); entry = (LeftTuple) entry.getNext(); } } return result.toArray(new LeftTuple[result.size()]); }
public void add(LeftTuple tuple) { Comparable key = getIndexedValue(tuple); LeftTupleList list = tree.insert(key); list.add(tuple); size++; }