stack.set(mylevel, null);
/** This is kind of crazy, but used by the setNameSpace command. zero based. */ public synchronized void set(int depth, NameSpace ns) { stack.set( stack.size()-1-depth, ns ); }
stack.set(mylevel, null);
/** This is kind of crazy, but used by the setNameSpace command. zero based. */ public void set(int depth, NameSpace ns) { stack.set( stack.size()-1-depth, ns ); }
public void setType(HTMLType type) { this.type.set(this.type.size() - 1, type); }
private boolean isStart() { boolean b = sepstack.peek(); if (b) { sepstack.set(sepstack.size() - 1, false); } return b; }
/** Swap in the value as the new top of the stack and return the old value. */ public NameSpace swap( NameSpace newTop ) { int last = stack.size() - 1; NameSpace oldTop = stack.get(last); stack.set( last, newTop ); return oldTop; }
private void indent() throws XMLStreamException { delegate.writeCharacters(NEW_LINE, 0, 1); for (int i = 0; i < indent; i++) { delegate.writeCharacters(SPACE, 0, 1); } indent += INDENT_SIZE; if (!stack.empty()) { stack.set(stack.size() - 1, Boolean.TRUE); } stack.push(Boolean.FALSE); }
public void setScannerContext(WikiScannerContext context) { if (fScannerContext.isEmpty()) { pushScannerContext(context); } else { fScannerContext.set(fScannerContext.size() - 1, context); } }
@Override public void setValueInScope(Object scope, String name, Collection coll) { int index = ((Integer) scope).intValue(); if (index >= 0) { Map currValues = (Map) scopes.get(index); currValues.put(cutoffPre(name), coll); scopes.set(index, currValues); } else log.warn("Cannot set value for variable '" + name + "', because " + "couldn't find scope."); }
private void checkSeparator() { if (separators.isEmpty()) { return; } else if (separators.peek() == Boolean.TRUE) { write(","); } else { separators.set(separators.size() - 1, Boolean.TRUE); } } }
public static void addGracePeriod(long time) { if (!logger.isDebugEnabled()) return; Stack<Long> stack = gracePeriod.get(); if (stack == null) return; for (int i = 0; i < stack.size(); i++) { long existing = stack.get(i); stack.set(i, existing + time); } }
/** {@inheritDoc} */ public void set(final IExpr value) { final Stack<IExpr> localVariableStack = EvalEngine.localStack(fSymbolName); localVariableStack.set(localVariableStack.size() - 1, value); }
private void checkSeparator() { if (separators.isEmpty()) { return; } else if (separators.peek() == Boolean.TRUE) { write(","); } else { separators.set(separators.size() - 1, Boolean.TRUE); } } }
@Override public void setContext(ExecutionContext context) { Stack<ExecutionContext> stack = this.context.get(); if (stack == null) { stack = new Stack<ExecutionContext>(); this.context.set(stack); stack.push(context); } else if (stack.isEmpty()) { stack.push(context); } else { if (context != null) { context.inheritFrom(stack.peek()); } stack.set(stack.size() - 1, context); } }
public void beginHeader(int level, WikiParameters params) { int sectionLevel = this.currentSectionLevel.peek(); // Close sections for (; sectionLevel >= level; --sectionLevel) { this.stack.push(new SectionBlock(generateListFromStack())); } // Open sections for (; sectionLevel < level; ++sectionLevel) { this.stack.push(this.marker); } this.currentSectionLevel.set(this.currentSectionLevel.size() - 1, sectionLevel); // Push header this.stack.push(this.marker); }
private void startChild(ChildKey key) { ensureRange(); if (needsComma) { optHashValueBuilder.append(","); } appendKey(optHashValueBuilder, key); optHashValueBuilder.append(":("); if (currentPathDepth == currentPath.size()) { currentPath.add(key); } else { currentPath.set(currentPathDepth, key); } currentPathDepth++; needsComma = false; }
private UninstalledExtensionCollection getCurrentJobUninstalledExtensions(boolean create) { ExecutionContext context = this.execution.getContext(); if (context != null) { Stack<UninstalledExtensionCollection> extensions = getUninstalledExtensionCollectionStack(false); if (extensions != null) { UninstalledExtensionCollection collection = extensions.peek(); if (collection == null && create) { collection = new UninstalledExtensionCollection(); extensions.set(extensions.size() - 1, collection); } return collection; } } return null; }
/** * JPOX wrapper addition that allows turning off of the dependent-field checks * when doing the position setting. This means that we can prevent the deletion of * the object that was previously in that position. This particular feature is used * when attaching a list field and where some elements have changed positions. * @param index The position * @param element The new element * @return The element previously at that position */ public Object set(int index, Object element, boolean allowDependentField) { // Reject inappropriate elements if (element == null && !allowNulls) { throw new NullsNotAllowedException(ownerSM, fieldName); } makeDirty(); if (useCache) { loadFromStore(); } if (backingStore != null) { backingStore.set(ownerSM, index, element, allowDependentField); } return delegate.set(index, element); }