|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.bop.CoreBaseBOp
public abstract class CoreBaseBOp
Base class with some common methods for mutable and copy-on-write BOp
s.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.bigdata.bop.BOp |
|---|
BOp.Annotations |
| Field Summary | |
|---|---|
protected static int |
DEFAULT_INITIAL_CAPACITY
The default initial capacity used for an empty annotation map -- empty maps use the minimum initial capacity to avoid waste since we create a large number of BOps during query evaluation. |
| Fields inherited from interface com.bigdata.bop.BOp |
|---|
NOANNS, NOARGS |
| Constructor Summary | |
|---|---|
CoreBaseBOp()
|
|
| Method Summary | ||
|---|---|---|
protected boolean |
annotationsEqual(BOp o)
Return true iff the annotations of this BOp and the
other BOp are equals. |
|
protected static boolean |
annotationsEqual(Map<String,Object> m1,
Map<String,Object> m2)
Compares two maps. |
|
protected void |
annotationsToString(StringBuilder sb)
|
|
protected void |
checkArgs(BOp[] args)
Check the operator argument. |
|
CoreBaseBOp |
clone()
Deep copy clone semantics. |
|
boolean |
equals(Object other)
true if all arguments and annotations are the same. |
|
BOpEvaluationContext |
getEvaluationContext()
Return the evaluation context for the operator as specified by BOp.Annotations.EVALUATION_CONTEXT. |
|
int |
getId()
Return the BOp.Annotations.BOP_ID. |
|
|
getProperty(String name,
T defaultValue)
Return the value of the named annotation. |
|
Object |
getRequiredProperty(String name)
Return the value of the named annotation. |
|
int |
hashCode()
The hash code is based on the hash of the operands (cached). |
|
static String |
indent(int depth)
Returns a string that may be used to indent a dump of the nodes in the tree. |
|
boolean |
isController()
Return true iff this operator is a controller. |
|
String |
toShortString()
General contract is a short (non-recursive) representation of the BOp. |
|
String |
toString()
Return a non-recursive representation of the arguments and annotations for this BOp. |
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.bigdata.bop.BOp |
|---|
annotations, argIterator, args, arity, get, setProperty, toArray, toArray |
| Methods inherited from interface cutthecrap.utils.striterators.IPropertySet |
|---|
getProperty |
| Field Detail |
|---|
protected static final transient int DEFAULT_INITIAL_CAPACITY
BOps during query evaluation.
| Constructor Detail |
|---|
public CoreBaseBOp()
| Method Detail |
|---|
protected void checkArgs(BOp[] args)
args - The arguments.
IllegalArgumentException - if the arguments are not valid for the operator.public CoreBaseBOp clone()
Deep copy clone of the operator.
clone in interface BOpclone in class Objectpublic String toShortString()
BOp.
toShortString in interface BOppublic String toString()
BOp.
toString in interface BOptoString in class Objectprotected void annotationsToString(StringBuilder sb)
public final Object getRequiredProperty(String name)
BOp
getRequiredProperty in interface BOpname - The name of the annotation.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954
public final <T> T getProperty(String name,
T defaultValue)
BOp
getProperty in interface BOpT - The generic type of the annotation value.name - The name of the annotation.defaultValue - The default value.
public final int getId()
BOpBOp.Annotations.BOP_ID.
getId in interface BOppublic final boolean isController()
BOptrue iff this operator is a controller.
isController in interface BOpBOp.Annotations.CONTROLLERpublic final BOpEvaluationContext getEvaluationContext()
BOpBOp.Annotations.EVALUATION_CONTEXT.
getEvaluationContext in interface BOppublic boolean equals(Object other)
true if all arguments and annotations are the same.
equals in class Objectprotected boolean annotationsEqual(BOp o)
true iff the annotations of this BOp and the
other BOp are equals.
Note: This method permits override by subclasses with direct access to the maps to be compared.
annotationsEqual(Map, Map)
protected static final boolean annotationsEqual(Map<String,Object> m1,
Map<String,Object> m2)
Arrays.equals(Object[], Object[]) to compare the values rather
than Object.equals(Object). Without this, two bops having array
annotation values which have the same data but different array instances
will not compare as equal.
m1 - One set of annotations.m2 - Another set of annotations.
true iff the annotations have the same data.public int hashCode()
hashCode in class Objectpublic static String indent(int depth)
Note: The string is capped out after a maximum supported depth.
depth - The indentation depth.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||