/** * Push an element as the <i>next</i> element on this stack * * @return this for convenience */ public CallStack addNext(final DocumentProcessor processor) { return addNext(new Call(processor, name, statistics, metric)); }
/** * Adds an element as the <i>last</i> element on this stack * * @return this for convenience */ public CallStack addLast(final DocumentProcessor processor) { return addLast(new Call(processor, name, statistics, metric)); }
/** * Adds an element just before the first occurence of some element on the * stack. This can not be called during an iteration. * * @param before * the call to add this before. If this call is not present (the * same object instance), the new processor is added as the last * element * @param processor the processor to add * @return this for convenience */ public CallStack addBefore(final Call before, DocumentProcessor processor) { return addBefore(before, new Call(processor, name, statistics, metric)); }
/** * Adds an element just after the first occurence of some other element on * the stack. This can not be called during an iteration. * * @param after * the call to add this after. If this call is not present, (the * same object instance), the new processor is added as the last * element * @param processor * the processor to add * @return this for convenience */ public CallStack addAfter(final Call after, final DocumentProcessor processor) { return addAfter(after, new Call(processor, name, statistics, metric)); }