/** Remove the field values from a struct of the correct type */ @Override public boolean removeFieldValues(Object[] fieldValues) { return this.contents.remove(fieldValues); }
@Override public boolean remove(Object o) { if (o instanceof Struct) { o = ((Struct) o).getFieldValues(); } return this.contents.remove(o); }
public boolean removeAll(StructSet ss) { boolean modified = false; if (!this.structType.equals(ss.structType)) { return false; // nothing // modified } for (Iterator itr = ss.fieldValuesIterator(); itr.hasNext();) { Object[] vals = (Object[]) itr.next(); if (this.contents.remove(vals)) { modified = true; } } return modified; }
/** Remove the field values from a struct of the correct type */ public boolean removeFieldValues(Object[] fieldValues) { return this.contents.remove(fieldValues); }
@Override public boolean remove(Object o) { if(o instanceof Struct) { o = ((Struct)o).getFieldValues(); } return this.contents.remove(o); }
public boolean removeAll(StructSet ss) { boolean modified = false; if (!this.structType.equals(ss.structType)) { return false; // nothing // modified } for (Iterator itr = ss.fieldValuesIterator(); itr.hasNext();) { Object[] vals = (Object[]) itr.next(); if (this.contents.remove(vals)) { modified = true; } } return modified; }
/** * Merges the given node with the a matching previous node. * * @param node node to attempt merge * @return true if the node was merged, false otherwise. */ private boolean reduce(KmerPathNode node) { KmerPathNode prev = prevKmerToMergeWith(node); if (prev != null) { assert(processed.contains(prev)); processed.remove(prev); endLookup.remove(prev); node.prepend(prev); return true; } KmerPathNode adj = adjacentBeforeKmerToMergeWith(node); if (adj != null) { assert(processed.contains(adj)); processed.remove(adj); endLookup.remove(adj); node.coaleseBeforeAdjacent(adj); return true; } return false; } private KmerPathNode adjacentBeforeKmerToMergeWith(KmerPathNode node) {
@Override public KmerPathNode next() { ensureBuffer(); KmerPathNode node = processed.pollFirst(); endLookup.remove(node); assert(!couldMergeToIncludeKmerAt(node, inputPosition)); return node; } @Override