public abstract class Operator
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
annotations |
protected int |
hashPrime |
protected SourceLocation |
location |
protected java.lang.String |
name |
protected OperatorPlan |
plan |
Constructor and Description |
---|
Operator(java.lang.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(java.lang.String key,
java.lang.Object val)
Add an annotation to a node in the plan.
|
java.lang.Object |
getAnnotation(java.lang.String key)
Look to see if a node is annotated.
|
SourceLocation |
getLocation() |
java.lang.String |
getName() |
OperatorPlan |
getPlan()
Get the plan associated with this operator.
|
abstract boolean |
isEqual(Operator operator)
This is like a shallow equals comparison.
|
java.lang.Object |
removeAnnotation(java.lang.String key)
Remove an annotation
|
void |
setLocation(SourceLocation loc) |
void |
setPlan(OperatorPlan p) |
protected SourceLocation location
protected java.lang.String name
protected OperatorPlan plan
protected transient java.util.Map<java.lang.String,java.lang.Object> annotations
protected final transient int hashPrime
public Operator(java.lang.String n, OperatorPlan p)
public abstract void accept(PlanVisitor v) throws FrontendException
v
- Visitor to accept.FrontendException
public java.lang.String getName()
public SourceLocation getLocation()
public void setLocation(SourceLocation loc)
public OperatorPlan getPlan()
public void annotate(java.lang.String key, java.lang.Object val)
key
- string name of this annotationval
- value, as an Objectpublic java.lang.Object getAnnotation(java.lang.String key)
key
- string name of annotation to look forpublic java.lang.Object removeAnnotation(java.lang.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