public class StackFilter extends Object implements Filter
StackFilter
object provides a filter that can
be given a collection of filters which can be used to resolve a
replacement. The order of the resolution used for this filter
is last in first used. This order allows the highest priority
filter to be added last within the stack.Constructor and Description |
---|
StackFilter()
Constructor for the
StackFilter object. |
Modifier and Type | Method and Description |
---|---|
void |
push(Filter filter)
This pushes the the provided
Filter on to the top
of the stack. |
String |
replace(String text)
Replaces the text provided with the value resolved from the
stacked filters.
|
public StackFilter()
StackFilter
object. This will
create an empty filter that initially resolves null for all
replacements requested. As filters are pushed into the stack
the replace
method can resolve replacements.public void push(Filter filter)
Filter
on to the top
of the stack. The last filter pushed on to the stack has the
highes priority in the resolution of a replacement value.filter
- this is a filter to be pushed on to the stackCopyright © 2021 Alibaba Cloud Computing. All rights reserved.