public abstract class Operator extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
annotations |
protected int |
hashPrime |
protected SourceLocation |
location |
protected String |
name |
protected OperatorPlan |
plan |
Constructor and Description |
---|
Operator(String n,
OperatorPlan p) |
Modifier and Type | Method and Description |
---|---|
abstract void |
accept(PlanVisitor v)
Accept a visitor at this node in the graph.
|
void |
annotate(String key,
Object val)
Add an annotation to a node in the plan.
|
Object |
getAnnotation(String key)
Look to see if a node is annotated.
|
SourceLocation |
getLocation() |
String |
getName() |
OperatorPlan |
getPlan()
Get the plan associated with this operator.
|
abstract boolean |
isEqual(Operator operator)
This is like a shallow equals comparison.
|
Object |
removeAnnotation(String key)
Remove an annotation
|
void |
setLocation(SourceLocation loc) |
void |
setPlan(OperatorPlan p) |
protected SourceLocation location
protected String name
protected OperatorPlan plan
protected final int hashPrime
public Operator(String n, OperatorPlan p)
public abstract void accept(PlanVisitor v) throws FrontendException
v
- Visitor to accept.FrontendException
public String getName()
public SourceLocation getLocation()
public void setLocation(SourceLocation loc)
public OperatorPlan getPlan()
public void annotate(String key, Object val)
key
- string name of this annotationval
- value, as an Objectpublic Object getAnnotation(String key)
key
- string name of annotation to look forpublic Object removeAnnotation(String key)
key
- the key of the annotationpublic void setPlan(OperatorPlan p)
public abstract boolean isEqual(Operator operator) throws FrontendException
operator
- FrontendException
Copyright © 2007-2017 The Apache Software Foundation