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
Expression
setOptions
in interface Expression
IOException
public void prepare() throws IOException
Expression
prepare
in interface Expression
IOException
public Result apply(org.apache.hadoop.fs.shell.PathData item, int depth) throws IOException
Expression
apply
in interface Expression
item
- PathData
item to be processeddepth
- distance of the item from the command line argumentResult
of applying the expression to the itemIOException
public void finish() throws IOException
Expression
finish
in interface Expression
IOException
public String[] getUsage()
Expression
getUsage
in interface Expression
public String[] getHelp()
Expression
getHelp
in interface Expression
public boolean isAction()
Expression
isAction
in interface Expression
public boolean isOperator()
Expression
isOperator
in interface Expression
public int getPrecedence()
Expression
getPrecedence
in interface Expression
public void addChildren(Deque<Expression> expressions)
Expression
addChildren
in interface Expression
expressions
- deque of expressions from which to take the childrenpublic void addArguments(Deque<String> args)
Expression
addArguments
in interface Expression
args
- deque of arguments from which to take expression argumentspublic void setConf(Configuration conf)
Configurable
setConf
in interface Configurable
public Configuration getConf()
Configurable
getConf
in interface Configurable
Copyright © 2017 Apache Software Foundation. All Rights Reserved.