public K next() { if (!hasNext()) { throw new NoSuchElementException(); } return universe.get(cur++); }
public OverflowList(PointsToBitVector bv) { BitSetIterator it = bv.iterator(); // Iterates over only the 1 bits while (it.hasNext()) { // Get the next node in the bitset by looking it up in the // pointer assignment graph. // Ripped from BitPointsToSet. Node n = (Node) (pag.getAllocNodeNumberer().get(it.next())); add(n); } }
/** Calls v's visit method on all nodes in this set. */ public final boolean forall(P2SetVisitor v) { for (BitSetIterator it = bits.iterator(); it.hasNext();) { v.visit((Node) pag.getAllocNodeNumberer().get(it.next())); } return v.getReturnValue(); }
public boolean forall(P2SetVisitor v) { // Iterate through the bit vector. Ripped from BitPointsToSet again. // It seems there should be a way to share code between BitPointsToSet // and // SharedHybridSet, but I don't know how at the moment. if (bitVector != null) { for (BitSetIterator it = bitVector.iterator(); it.hasNext();) { v.visit((Node) pag.getAllocNodeNumberer().get(it.next())); } } // Iterate through the overflow list for (OverflowList.ListNode i = overflow.overflow; i != null; i = i.next) { v.visit(i.elem); } return v.getReturnValue(); }
/** Calls v's visit method on all nodes in this set. */ public final boolean forall(P2SetVisitor v) { if (bits == null) { for (Node node : nodes) { if (node == null) { return v.getReturnValue(); } v.visit(node); } } else { for (BitSetIterator it = bits.iterator(); it.hasNext();) { v.visit(pag.getAllocNodeNumberer().get(it.next())); } } return v.getReturnValue(); }
public Object next() { if(!hasNext()) throw new NoSuchElementException(); return universe.get(cur++); } public void remove() { throw new UnsupportedOperationException(); }
public final Object next() { return universe.get( iter.next() ); }
public Object next() { if(!hasNext()) throw new NoSuchElementException(); return universe.get(cur++); } public void remove() { throw new UnsupportedOperationException(); }
public final Object next() { return universe.get( iter.next() ); }