@Override public boolean offerLast(E e) { synchronized (mutex) { return delegate().offerLast(e); } }
@Override public synchronized boolean offerLast(V e) { return delegate.offerLast(e); }
/** * Undo last spell */ public void undoLastSpell() { if (!undoStack.isEmpty()) { Command previousSpell = undoStack.pollLast(); redoStack.offerLast(previousSpell); LOGGER.info("{} undoes {}", this, previousSpell); previousSpell.undo(); } }
/** * Redo last spell */ public void redoLastSpell() { if (!redoStack.isEmpty()) { Command previousSpell = redoStack.pollLast(); undoStack.offerLast(previousSpell); LOGGER.info("{} redoes {}", this, previousSpell); previousSpell.redo(); } }
/** * Cast spell */ public void castSpell(Command command, Target target) { LOGGER.info("{} casts {} at {}", this, command, target); command.execute(target); undoStack.offerLast(command); }
@Override public boolean offerLast(E e) { synchronized (mutex) { return delegate().offerLast(e); } }
/** {@inheritDoc} */ @Override public boolean offerLast(E e) { boolean res = deque.offerLast(e); if (res) adder.increment(); return res; }
@Override public boolean offerLast(E e) { synchronized (mutex) { return delegate().offerLast(e); } }
@CanIgnoreReturnValue // TODO(cpovirk): Consider removing this? @Override public boolean offerLast(E e) { return delegate().offerLast(e); }
@Override public boolean offerLast(E e) { assertTrue(Thread.holdsLock(mutex)); return delegate.offerLast(e); }
@Override public boolean offerLast(E e) { synchronized (mutex) { return delegate().offerLast(e); } }
@CanIgnoreReturnValue // TODO(cpovirk): Consider removing this? @Override public boolean offerLast(E e) { return delegate().offerLast(e); }
@CanIgnoreReturnValue // TODO(cpovirk): Consider removing this? @Override public boolean offerLast(E e) { return delegate().offerLast(e); }
@Override public Void visitStartElement(StartElementTree startTree, Void unused) { if (PRE_TAGS.contains(startTree.getName().toString())) { startPosStack.offerLast(getEndPosition(startTree, state)); containsAnotherTag = false; } return super.visitStartElement(startTree, null); }
@CanIgnoreReturnValue // TODO(cpovirk): Consider removing this? @Override public boolean offerLast(E e) { return delegate().offerLast(e); }
_idle.offerLast(new TimedObject<T>(obj)); } else { _checkedOut++;
create().addLast("e"); create().offerFirst("e"); create().offerLast("e"); create().removeFirst(); create().removeLast();
() -> d.addLast(null), () -> d.offerFirst(null), () -> d.offerLast(null), () -> d.push(null), () -> d.descendingIterator().forEachRemaining(null));
path.offerLast(new Pair<>(zero.getFirst(), zero.getSecond())); return true;