public class MergeIterator extends ContextBean implements Param.UnnamedParametric
Component for MergeIteratorTag, which job is to merge iterators and successive call to the merged iterator will cause each merge iterator to have a chance to expose its element, subsequently next call will allow the next iterator to expose its element. Once the last iterator is done exposing its element, the first iterator is allowed to do so again (unless it is exhausted of entries).
Internally the task are delegated to MergeIteratorFilter
Example if there are 3 lists being merged, each list have 3 entries, the following will be the logic.
MergeIteratorFilter
,
MergeIteratorTag
var
actionMapper, COMPONENT_STACK, devMode, parameters, stack, standardAttributesMap, throwExceptionOnELFailure
Constructor and Description |
---|
MergeIterator(ValueStack stack) |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(Object value)
Adds the given value as a parameter to the outer tag.
|
boolean |
end(Writer writer,
String body)
Callback for the end tag of this component.
|
void |
setVar(String var) |
boolean |
start(Writer writer)
Callback for the start tag of this component.
|
getVar, putInContext
addAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, copyParams, determineActionURL, determineNamespace, end, escapeHtmlBody, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, getStandardAttributes, isValidTagAttribute, popComponentStack, setActionMapper, setDevMode, setThrowExceptionsOnELFailure, setUrlHelper, stripExpressionIfAltSyntax, toString, usesBody
public MergeIterator(ValueStack stack)
public boolean start(Writer writer)
Component
public boolean end(Writer writer, String body)
Component
public void setVar(String var)
setVar
in class ContextBean
public void addParameter(Object value)
Param.UnnamedParametric
addParameter
in interface Param.UnnamedParametric
value
- the valueCopyright © 2000–2020 Apache Software Foundation. All rights reserved.