public T pop () { if (iterating > 0) throw new IllegalStateException("Invalid between begin/end."); return super.pop(); }
public T pop () { if (iterating > 0) throw new IllegalStateException("Invalid between begin/end."); return super.pop(); }
/** Returns an object from this pool. The object may be new (from {@link #newObject()}) or reused (previously * {@link #free(Object) freed}). */ public T obtain () { return freeObjects.size == 0 ? newObject() : freeObjects.pop(); }
/** Returns an object from this pool. The object may be new (from {@link #newObject()}) or reused (previously * {@link #free(Object) freed}). */ public T obtain () { return freeObjects.size == 0 ? newObject() : freeObjects.pop(); }
public T pop () { modified(); return super.pop(); }
protected void close () { root = elements.pop(); current = elements.size > 0 ? elements.peek() : null; }
protected void close () { root = elements.pop(); current = elements.size > 0 ? elements.peek() : null; }
public T pop () { modified(); return super.pop(); }
public XmlWriter pop () throws IOException { if (currentElement != null) { writer.write("/>\n"); currentElement = null; } else { indent = Math.max(indent - 1, 0); if (indentNextClose) indent(); writer.write("</"); writer.write(stack.pop()); writer.write(">\n"); } indentNextClose = true; return this; }
public JsonWriter pop () throws IOException { if (named) throw new IllegalStateException("Expected an object, array, or value since a name was set."); stack.pop().close(); current = stack.size == 0 ? null : stack.peek(); return this; }
public JsonWriter pop () throws IOException { if (named) throw new IllegalStateException("Expected an object, array, or value since a name was set."); stack.pop().close(); current = stack.size == 0 ? null : stack.peek(); return this; }
public boolean executeRunnables () { synchronized (runnables) { for (int i = runnables.size - 1; i >= 0; i--) executedRunnables.addAll(runnables.get(i)); runnables.clear(); } if (executedRunnables.size == 0) return false; do executedRunnables.pop().run(); while (executedRunnables.size > 0); return true; }
public boolean executeRunnables () { synchronized (runnables) { for (int i = runnables.size - 1; i >= 0; i--) executedRunnables.add(runnables.get(i)); runnables.clear(); } if (executedRunnables.size == 0) return false; do executedRunnables.pop().run(); while (executedRunnables.size > 0); return true; }
public boolean executeRunnables () { synchronized (runnables) { for (int i = runnables.size - 1; i >= 0; i--) executedRunnables.addAll(runnables.get(i)); runnables.clear(); } if (executedRunnables.size == 0) return false; do executedRunnables.pop().run(); while (executedRunnables.size > 0); return true; }
public boolean executeRunnables () { synchronized (runnables) { for (int i = runnables.size - 1; i >= 0; i--) executedRunnables.add(runnables.get(i)); runnables.clear(); } if (executedRunnables.size == 0) return false; do executedRunnables.pop().run(); while (executedRunnables.size > 0); return true; }
/** Pops the current scissor rectangle from the stack and sets the new scissor area to the new top of stack rectangle. In case * no more rectangles are on the stack, {@link GL20#GL_SCISSOR_TEST} is disabled. * <p> * Any drawing should be flushed before popping scissors. */ public static Rectangle popScissors () { Rectangle old = scissors.pop(); if (scissors.size == 0) Gdx.gl.glDisable(GL20.GL_SCISSOR_TEST); else { Rectangle scissor = scissors.peek(); HdpiUtils.glScissor((int)scissor.x, (int)scissor.y, (int)scissor.width, (int)scissor.height); } return old; }