org.erights.e.elib.tables
Class FlexList

java.lang.Object
  |
  +--org.erights.e.elib.tables.EList
        |
        +--org.erights.e.elib.tables.FlexList
All Implemented Interfaces:
EPrintable, Iteratable, Marker, PassByProxy, Persistent, Serializable
Direct Known Subclasses:
FlexListImpl

public abstract class FlexList
extends EList
implements PassByProxy

Safe:

See Also:
Serialized Form

Field Summary
(package private) static long serialVersionUID
           
 
Fields inherited from interface org.erights.e.elib.serial.PassByProxy
HONORARY, HONORED_NAMES
 
Fields inherited from interface org.erights.e.elib.serial.Persistent
HONORARY, HONORED_NAMES
 
Constructor Summary
(package private) FlexList()
          Only subclasses within the package
 
Method Summary
 Object[] __optUncall()
          Enabled: A FlexList is unconditionally transparent
 void __printOn(TextWriter out)
          Enabled: Prints use E list syntax followed by ".diverge()" (to indicate flexible).
 void append(EList other)
          Enabled: Put all the elements of other, in order, onto the end of this list.
 void ensureSize(int minSize)
          Enabled: Make this list be at least 'minSize', extending as necessary.
static FlexList fromType(Class type)
          Enabled:
static FlexList fromType(Class type, int initialCapacity)
          Enabled:
 void insert(int start, Object value)
          Enabled: 'x.insert(i,v)' is the same as 'x(i,i) := [v]', ie, 'x.setRun(i,i,[v])'.
static FlexList make()
          Enabled:
static FlexList make(int initialCapacity)
          Enabled:
 Object pop()
          Enabled: Remove and return the last element of this list.
 void push(Object value)
          Enabled: Put the value on the end of the list, making the list one larger.
abstract  void put(int index, Object value)
          Enabled: Places value at this index.
 EList readOnly()
          Enabled: Returns a read-only facet on this list.
 ConstList removeRun(int start, int bound)
          Enabled: Remove and return the run of this list from start..!bound
 ConstList removeRun(Object intReg)
          Enabled: Remove and return the run of this list at intReg
abstract  void replace(int start, int bound, EList other, int lstart, int lbound)
          Enabled: Replace from start..!bound in this list with lstart..!lbound in other.
 void setRun(int start, int bound, EList other)
          Enabled: Replace from start..!bound in this list with other.
 void setRun(Object intReg, EList other)
          Enabled: Replace the run at intReg with other.
abstract  void setSize(int newSize)
          Enabled: Make this list be exactly 'newSize', truncating or extending as necessary.
(package private) abstract  void sortInPlace(CompFunc func)
          Reorders the list in place into ascending order according to func
 
Methods inherited from class org.erights.e.elib.tables.EList
add, asKeys, asMap, asSet, contains, diverge, diverge, get, getArray, getArray, getArray, includes, indexOf1, indexOf1, iterate, last, lastIndexOf1, lastIndexOf1, lastStartOf, lastStartOf, multiply, printOn, run, run, size, snapshot, sort, sort, startOf, startOf, toString, valueType, with, with
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
Constructor Detail

FlexList

FlexList()
Only subclasses within the package

Method Detail

readOnly

public EList readOnly()
Enabled: Returns a read-only facet on this list. Someone holding this facet may see changes, but they cannot cause them.

Specified by:
readOnly in class EList

put

public abstract void put(int index,
                         Object value)
                  throws IndexOutOfBoundsException
Enabled: Places value at this index. If index is the current size of the list, the list is extended with this element. Otherwise, if the index is out of range, throws IndexOutOfBoundsException

Throws:
IndexOutOfBoundsException - if index isn't in 0..size

sortInPlace

abstract void sortInPlace(CompFunc func)
Reorders the list in place into ascending order according to func


push

public void push(Object value)
Enabled: Put the value on the end of the list, making the list one larger.


append

public void append(EList other)
Enabled: Put all the elements of other, in order, onto the end of this list.


pop

public Object pop()
Enabled: Remove and return the last element of this list.


setSize

public abstract void setSize(int newSize)
Enabled: Make this list be exactly 'newSize', truncating or extending as necessary. If this list is extended, what is it filled with? If it is of a scalar valueType(), it is filled with the zero element for that scalar. Otherwise, it is filled with nulls.


ensureSize

public void ensureSize(int minSize)
Enabled: Make this list be at least 'minSize', extending as necessary.

See Also:
org.erights.e.elib.tables.FlexList#setSize

setRun

public void setRun(Object intReg,
                   EList other)
Enabled: Replace the run at intReg with other.


setRun

public void setRun(int start,
                   int bound,
                   EList other)
Enabled: Replace from start..!bound in this list with other.


insert

public void insert(int start,
                   Object value)
Enabled: 'x.insert(i,v)' is the same as 'x(i,i) := [v]', ie, 'x.setRun(i,i,[v])'.


replace

public abstract void replace(int start,
                             int bound,
                             EList other,
                             int lstart,
                             int lbound)
Enabled: Replace from start..!bound in this list with lstart..!lbound in other.


removeRun

public ConstList removeRun(Object intReg)
Enabled: Remove and return the run of this list at intReg


removeRun

public ConstList removeRun(int start,
                           int bound)
Enabled: Remove and return the run of this list from start..!bound


__optUncall

public Object[] __optUncall()
Enabled: A FlexList is unconditionally transparent

Returns:

__printOn

public void __printOn(TextWriter out)
               throws IOException
Enabled: Prints use E list syntax followed by ".diverge()" (to indicate flexible).

Specified by:
__printOn in interface EPrintable
IOException

make

public static FlexList make()
Enabled:


make

public static FlexList make(int initialCapacity)
Enabled:


fromType

public static FlexList fromType(Class type)
Enabled:


fromType

public static FlexList fromType(Class type,
                                int initialCapacity)
Enabled:



comments?