org.erights.e.elib.tables
Class ConstListImpl

java.lang.Object
  |
  +--org.erights.e.elib.tables.EList
        |
        +--org.erights.e.elib.tables.ConstList
              |
              +--org.erights.e.elib.tables.ConstListImpl
All Implemented Interfaces:
ArrayedList, EPrintable, Guard, Iteratable, Marker, PassByConstruction, Persistent, Selfless, Serializable, SlotGuard, ValueGuard

class ConstListImpl
extends ConstList
implements ArrayedList

Author:
Mark S. Miller

Field Summary
private  Object myVals
          myVals is an array
private static long serialVersionUID
           
 
Fields inherited from class org.erights.e.elib.tables.ConstList
EmptyList
 
Fields inherited from interface org.erights.e.elib.serial.PassByConstruction
HONORARY, HONORED_NAMES
 
Fields inherited from interface org.erights.e.elib.tables.Selfless
HONORARY, HONORED_NAMES
 
Fields inherited from interface org.erights.e.elib.serial.Persistent
HONORARY, HONORED_NAMES
 
Constructor Summary
(package private) ConstListImpl(Object vals)
          The caller is *trusted* not to modify vals after handing it in.
 
Method Summary
 Object[] __optUncall()
          ConstLists don't uncall according to the form of their spreadCall, in order to avoid an infinite regress.
 Object get(int index)
          Enabled: What value does 'index' map to?
 Object getSecretArray()
          The caller is *trusted* not to modify the returned array.
 Object[] getSpreadUncall()
          'ConstListMaker.fromArray(myVals)'
 int size()
          How many entries are in the table?
 Class valueType()
          All values in this table must be of this type
 
Methods inherited from class org.erights.e.elib.tables.ConstList
__printOn, accepts, and, butNot, coerce, coerce, compareTo, compareTo, fromArray, fromArray, get, GetMaker, getName, makeSlot, makeSlot, match, not, or, readOnly, snapshot, xor
 
Methods inherited from class org.erights.e.elib.tables.EList
add, asKeys, asMap, asSet, contains, diverge, diverge, getArray, getArray, getArray, includes, indexOf1, indexOf1, iterate, last, lastIndexOf1, lastIndexOf1, lastStartOf, lastStartOf, multiply, printOn, run, run, sort, sort, startOf, startOf, toString, with, with
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID

myVals

private final Object myVals
myVals is an array

Constructor Detail

ConstListImpl

ConstListImpl(Object vals)
The caller is *trusted* not to modify vals after handing it in.

Method Detail

getSpreadUncall

public Object[] getSpreadUncall()
'ConstListMaker.fromArray(myVals)'

Specified by:
getSpreadUncall in interface Selfless

__optUncall

public Object[] __optUncall()
ConstLists don't uncall according to the form of their spreadCall, in order to avoid an infinite regress.

'ConstListMaker.run(myVals...)'

Overrides:
__optUncall in class ConstList

getSecretArray

public Object getSecretArray()
The caller is *trusted* not to modify the returned array. Even though this is declared 'public', it is believed (and required) to be package scope, since all declarations are only in package scoped classes or interfaces.

Specified by:
getSecretArray in interface ArrayedList

get

public Object get(int index)
           throws IndexOutOfBoundsException
Description copied from class: EList
Enabled: What value does 'index' map to?

Specified by:
get in class EList
Returns:
nullOk; the value at index may be null.
Throws:
IndexOutOfBoundsException - if index isn't in 0..!size.

size

public int size()
How many entries are in the table?

Specified by:
size in class EList

valueType

public Class valueType()
All values in this table must be of this type

Specified by:
valueType in class EList


comments?