public abstract class FilterExpression extends Object implements Expression, Configurable
Expression interface.
Allows other Expression implementations to be reused without
inheritance.| Modifier and Type | Field and Description |
|---|---|
protected Expression |
expression |
| Modifier | Constructor and Description |
|---|---|
protected |
FilterExpression(Expression expression) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArguments(Deque<String> args)
Adds arguments to this expression.
|
void |
addChildren(Deque<Expression> expressions)
Adds children to this expression.
|
Result |
apply(org.apache.hadoop.fs.shell.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.
|
String[] |
getHelp()
Returns a description of the expression for use in help.
|
int |
getPrecedence()
Returns the precedence of this expression
(only applicable to operators).
|
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.
|
String |
toString() |
protected Expression expression
protected FilterExpression(Expression expression)
public void setOptions(FindOptions options) throws IOException
ExpressionsetOptions in interface ExpressionIOExceptionpublic void prepare()
throws IOException
Expressionprepare in interface ExpressionIOExceptionpublic Result apply(org.apache.hadoop.fs.shell.PathData item, int depth) throws 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 itemIOExceptionpublic void finish()
throws IOException
Expressionfinish in interface ExpressionIOExceptionpublic String[] getUsage()
ExpressiongetUsage in interface Expressionpublic 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(Deque<Expression> expressions)
ExpressionaddChildren in interface Expressionexpressions - deque of expressions from which to take the childrenpublic void addArguments(Deque<String> args)
ExpressionaddArguments in interface Expressionargs - deque of arguments from which to take expression argumentspublic void setConf(Configuration conf)
ConfigurablesetConf in interface Configurablepublic Configuration getConf()
ConfigurablegetConf in interface ConfigurableCopyright © 2008–2022 Apache Software Foundation. All rights reserved.