org.eigenbase.reltype
Class RelDataTypeFieldImpl

java.lang.Object
  extended by org.eigenbase.reltype.RelDataTypeFieldImpl
All Implemented Interfaces:
Serializable, RelDataTypeField

public class RelDataTypeFieldImpl
extends Object
implements RelDataTypeField, Serializable

Default implementation of RelDataTypeField.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/reltype/RelDataTypeFieldImpl.java#12 $
Author:
jhyde
See Also:
Serialized Form

Field Summary
private  int index
           
private  String name
           
private  RelDataType type
           
 
Constructor Summary
RelDataTypeFieldImpl(String name, int index, RelDataType type)
           
 
Method Summary
 int getIndex()
          Gets the ordinal of this field within its containing type.
 String getName()
          Gets the name of this field, which is unique within its containing type.
 RelDataType getType()
          Gets the type of this field.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

private final RelDataType type

name

private final String name

index

private final int index
Constructor Detail

RelDataTypeFieldImpl

public RelDataTypeFieldImpl(String name,
                            int index,
                            RelDataType type)
"Precondition:"
name != null, type != null
Method Detail

getName

public String getName()
Description copied from interface: RelDataTypeField
Gets the name of this field, which is unique within its containing type.

Specified by:
getName in interface RelDataTypeField
Returns:
field name

getIndex

public int getIndex()
Description copied from interface: RelDataTypeField
Gets the ordinal of this field within its containing type.

Specified by:
getIndex in interface RelDataTypeField
Returns:
0-based ordinal

getType

public RelDataType getType()
Description copied from interface: RelDataTypeField
Gets the type of this field.

Specified by:
getType in interface RelDataTypeField
Returns:
field type

toString

public String toString()
Overrides:
toString in class Object