org.eigenbase.relopt
Interface RelTrait

All Known Implementing Classes:
CallingConvention, VolcanoPlannerTraitTest.AltTrait

public interface RelTrait

RelTrait represents the manifestation of a relational expression trait within a trait definition. For example, a CallingConvention.JAVA is a trait of the CallingConventionTraitDef trait definition.

Note about equals() and hashCode()
If all instances of RelTrait for a paritcular RelTraitDef are defined in an enumeration class and no new RelTraits can be introduced at runtime, you need not override hashCode() and equals(Object). If, however, new RelTrait instances are generated at runtime (e.g. based on state external to the planner), you must implement hashCode() and equals(Object) for proper canonization of your RelTrait objects.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/relopt/RelTrait.java#8 $
Author:
Stephan Zuercher

Method Summary
 boolean equals(Object o)
          See note about equals() and hashCode().
 RelTraitDef getTraitDef()
          Returns the RelTraitDef that defines this RelTrait.
 int hashCode()
          See note about equals() and hashCode().
 String toString()
          Returns a succinct name for this trait.
 

Method Detail

getTraitDef

RelTraitDef getTraitDef()
Returns the RelTraitDef that defines this RelTrait.

Returns:
the RelTraitDef that defines this RelTrait

hashCode

int hashCode()
See note about equals() and hashCode().

Overrides:
hashCode in class Object

equals

boolean equals(Object o)
See note about equals() and hashCode().

Overrides:
equals in class Object

toString

String toString()
Returns a succinct name for this trait. The planner may use this String to describe the trait.

Overrides:
toString in class Object