org.erights.e.elib.tables
Class Column

java.lang.Object
  |
  +--org.erights.e.elib.tables.Column
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
IntColumn, KeyColumn, RefColumn, ScalarColumn, VoidColumn

abstract class Column
extends Object
implements Cloneable

A column of a FlexMapImpl.

A FlexMapImpl has a KeyColumn for the keys that it maps from, and a Column for the values being mapped to. The indices into a column are called positions.

Author:
Mark S. Miller

Constructor Summary
(package private) Column()
           
 
Method Summary
(package private) abstract  int capacity()
           
protected  Object clone()
          Argument defaults to memberType()
protected abstract  Column diverge(Class membType)
          A shallow copy of the column.
(package private) abstract  Object get(int pos)
           
(package private) abstract  Class memberType()
          All the members of the column must conform to this type
(package private) abstract  Column newVacant(int capacity)
          Makes a new column just like this one, except of the specified size and without any members.
(package private) abstract  void put(int pos, Object value)
           
(package private) abstract  void vacate(int pos)
          Stop pointing at an object from this pos.
static Column values(Class memberType, int capacity)
          Make a value-column that can only hold values that conform to 'memberType' and has 'capacity' positions.
static Column values(int capacity)
          memberType defaults to Object
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Column

Column()
Method Detail

diverge

protected abstract Column diverge(Class membType)
A shallow copy of the column. The members are shared, not copied. The new Column is restricted to only holding members of type membType.


clone

protected Object clone()
Argument defaults to memberType()

Overrides:
clone in class Object
Returns:
a clone of this instance.
See Also:
java.lang.Cloneable

get

abstract Object get(int pos)

memberType

abstract Class memberType()
All the members of the column must conform to this type


newVacant

abstract Column newVacant(int capacity)
Makes a new column just like this one, except of the specified size and without any members.


capacity

abstract int capacity()

put

abstract void put(int pos,
                  Object value)

vacate

abstract void vacate(int pos)
Stop pointing at an object from this pos. If this is a scalar column, does nothing


values

public static Column values(int capacity)
memberType defaults to Object


values

public static Column values(Class memberType,
                            int capacity)
Make a value-column that can only hold values that conform to 'memberType' and has 'capacity' positions. If the memberType is a scalar type, the column will represent these values unboxed.



comments?