Configurable, Expressionpublic abstract class FilterExpression extends java.lang.Object implements Expression, Configurable
Expression interface.
Allows other Expression implementations to be reused without
inheritance.| Modifier and Type | Field | Description |
|---|---|---|
protected Expression |
expression |
| Modifier | Constructor | Description |
|---|---|---|
protected |
FilterExpression(Expression expression) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addArguments(java.util.Deque<java.lang.String> args) |
Adds arguments to this expression.
|
void |
addChildren(java.util.Deque<Expression> expressions) |
Adds children to this expression.
|
Result |
apply(PathData item,
int depth) |
Apply the expression to the specified item, called once for each item.
|
void |
finish() |
Finishes the expression, called once after processing all items.
|
Configuration |
getConf() |
Return the configuration used by this object.
|
java.lang.String[] |
getHelp() |
Returns a description of the expression for use in help.
|
int |
getPrecedence() |
Returns the precedence of this expression
(only applicable to operators).
|
java.lang.String[] |
getUsage() |
Returns brief usage instructions for this expression.
|
boolean |
isAction() |
Indicates whether this expression performs an action, i.e.
|
boolean |
isOperator() |
Identifies the expression as an operator rather than a primary.
|
void |
prepare() |
Prepares the expression for execution, called once after setting options
and before processing any options.
|
void |
setConf(Configuration conf) |
Set the configuration to be used by this object.
|
void |
setOptions(FindOptions options) |
Set the options for this expression, called once before processing any
items.
|
java.lang.String |
toString() |
protected Expression expression
protected FilterExpression(Expression expression)
public void setOptions(FindOptions options) throws java.io.IOException
ExpressionsetOptions in interface Expressionoptions - options.java.io.IOException - raised on errors performing I/O.public void prepare()
throws java.io.IOException
Expressionprepare in interface Expressionjava.io.IOException - raised on errors performing I/O.public Result apply(PathData item, int depth) throws java.io.IOException
Expressionapply in interface Expressionitem - PathData item to be processeddepth - distance of the item from the command line argumentResult of applying the expression to the itemjava.io.IOException - raised on errors performing I/O.public void finish()
throws java.io.IOException
Expressionfinish in interface Expressionjava.io.IOException - raised on errors performing I/O.public java.lang.String[] getUsage()
ExpressiongetUsage in interface Expressionpublic java.lang.String[] getHelp()
ExpressiongetHelp in interface Expressionpublic boolean isAction()
ExpressionisAction in interface Expressionpublic boolean isOperator()
ExpressionisOperator in interface Expressionpublic int getPrecedence()
ExpressiongetPrecedence in interface Expressionpublic void addChildren(java.util.Deque<Expression> expressions)
ExpressionaddChildren in interface Expressionexpressions - deque of expressions from which to take the childrenpublic void addArguments(java.util.Deque<java.lang.String> args)
ExpressionaddArguments in interface Expressionargs - deque of arguments from which to take expression argumentspublic void setConf(Configuration conf)
ConfigurablesetConf in interface Configurableconf - configuration to be usedpublic Configuration getConf()
ConfigurablegetConf in interface Configurablepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.