/** Create an empty revision queue. */ protected BlockRevQueue() { free = new BlockFreeList(); }
public void clear() { head = null; free.clear(); }
/** {@inheritDoc} */ @Override public RevCommit next() { final Block b = head; if (b == null) return null; final RevCommit c = b.pop(); if (b.isEmpty()) { head = b.next; if (head == null) tail = null; free.freeBlock(b); } return c; }
/** * Insert the commit pointer at the front of the queue. * * @param c * the commit to insert into the queue. */ public void unpop(RevCommit c) { Block b = head; if (b == null) { b = free.newBlock(); b.resetToMiddle(); b.add(c); head = b; tail = b; return; } else if (b.canUnpop()) { b.unpop(c); return; } b = free.newBlock(); b.resetToEnd(); b.unpop(c); b.next = head; head = b; }
/** * Insert the commit pointer at the front of the queue. * * @param c * the commit to insert into the queue. */ public void unpop(final RevCommit c) { Block b = head; if (b == null) { b = free.newBlock(); b.resetToMiddle(); b.add(c); head = b; tail = b; return; } else if (b.canUnpop()) { b.unpop(c); return; } b = free.newBlock(); b.resetToEnd(); b.unpop(c); b.next = head; head = b; }
/** * Insert the commit pointer at the front of the queue. * * @param c * the commit to insert into the queue. */ public void unpop(RevCommit c) { Block b = head; if (b == null) { b = free.newBlock(); b.resetToMiddle(); b.add(c); head = b; tail = b; return; } else if (b.canUnpop()) { b.unpop(c); return; } b = free.newBlock(); b.resetToEnd(); b.unpop(c); b.next = head; head = b; }
/** {@inheritDoc} */ @Override public RevCommit next() { final Block b = head; if (b == null) return null; final RevCommit c = b.pop(); if (b.isEmpty()) { head = b.next; if (head == null) tail = null; free.freeBlock(b); } return c; }
/** {@inheritDoc} */ @Override public RevCommit next() { final Block b = head; if (b == null) return null; final RevCommit c = b.pop(); if (b.isEmpty()) { head = b.next; free.freeBlock(b); } return c; }
/** {@inheritDoc} */ @Override public RevCommit next() { final Block b = head; if (b == null) return null; final RevCommit c = b.pop(); if (b.isEmpty()) { head = b.next; free.freeBlock(b); } return c; }
BlockRevQueue(Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { free = new BlockFreeList(); outputType = s.outputType(); s.shareFreeList(this); for (;;) { final RevCommit c = s.next(); if (c == null) break; add(c); } }
public RevCommit next() { final Block b = head; if (b == null) return null; final RevCommit c = b.pop(); if (b.isEmpty()) { head = b.next; if (head == null) tail = null; free.freeBlock(b); } return c; }
/** {@inheritDoc} */ @Override public void clear() { head = null; free.clear(); }
/** {@inheritDoc} */ @Override public void add(RevCommit c) { Block b = head; if (b == null || !b.canUnpop()) { b = free.newBlock(); b.resetToEnd(); b.next = head; head = b; } b.unpop(c); }
/** * Create an empty revision queue. */ protected BlockRevQueue() { free = new BlockFreeList(); }
/** {@inheritDoc} */ @Override public void clear() { head = null; tail = null; free.clear(); }
/** {@inheritDoc} */ @Override public void clear() { head = null; free.clear(); }
/** * Create an empty revision queue. */ protected BlockRevQueue() { free = new BlockFreeList(); }