|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.relopt.RelTraitSet
public class RelTraitSet
RelTraitSet represents an ordered set of RelTrait
s.
Field Summary | |
---|---|
private RelTrait[] |
traits
|
Constructor Summary | |
---|---|
RelTraitSet(RelTrait... traits)
Constructs a RelTraitSet with the given set of RelTraits. |
Method Summary | |
---|---|
void |
addTrait(RelTrait trait)
Adds a new RelTrait to the set. |
private RelTrait |
canonize(RelTrait trait)
Converts a trait to canonical form. |
RelTraitSet |
clone()
|
boolean |
contains(RelTrait trait)
Returns whether this trait set contains a given trait. |
boolean |
equals(Object obj)
Compares two RelTraitSet objects for equality. |
private int |
findIndex(RelTraitDef traitDef)
Finds the index of a trait of a given type in this set. |
RelTrait |
getTrait(int index)
Retrieves a RelTrait from the set. |
RelTrait |
getTrait(RelTraitDef traitDef)
Retrieves a RelTrait of the given type from the set. |
boolean |
matches(RelTraitSet that)
Compares two RelTraitSet objects to see if they match for the purposes of firing a rule. |
RelTrait |
setTrait(int index,
RelTrait trait)
Replaces an existing RelTrait in the set. |
RelTrait |
setTrait(RelTraitDef traitDef,
RelTrait trait)
Replaces an existing RelTrait in the set. |
int |
size()
Returns the size of the RelTraitSet. |
String |
toString()
Outputs the traits of this set as a String. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private RelTrait[] traits
Constructor Detail |
---|
public RelTraitSet(RelTrait... traits)
traits
- TraitsMethod Detail |
---|
public RelTrait getTrait(int index)
index
- 0-based index into ordered RelTraitSet
ArrayIndexOutOfBoundsException
- if index greater than or equal to
size()
or less than 0.public RelTrait getTrait(RelTraitDef traitDef)
traitDef
- the type of RelTrit to retrieve
public RelTrait setTrait(int index, RelTrait trait)
RelNode
that has
already been registered with a RelOptPlanner
.
index
- 0-based index into ordered RelTraitSettrait
- the new RelTrait
public RelTrait setTrait(RelTraitDef traitDef, RelTrait trait)
RelNode
that has
already been registered with a RelOptPlanner
.
traitDef
- the type of RelTrait to replace
public void addTrait(RelTrait trait)
RelNode
that has already
been registered with a RelOptPlanner
.
trait
- the new RelTraitpublic int size()
private RelTrait canonize(RelTrait trait)
After canonization, t1.equals(t2) if and only if t1 == t2.
trait
- Trait
public boolean equals(Object obj)
equals
in class Object
obj
- another RelTraitSet
public boolean matches(RelTraitSet that)
that
- another RelTraitSet
public boolean contains(RelTrait trait)
trait
- Sought trait
public String toString()
toString
in class Object
public RelTraitSet clone()
clone
in class Object
private int findIndex(RelTraitDef traitDef)
traitDef
- Sought trait definition
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |