|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elib.tables.EList | +--org.erights.e.elib.tables.ConstList
Safe: A ConstList is an immutable list that simplifies to an array or String, which is Selfless and pass by construction.
A ConstList can be compared for partial ordering with other ConstLists.
As a special case, a ConstList all of whose elements are DeepPassByCopy
is itself considered to be DeepPassByCopy by
Ref.isDeepPassByCopy/1
.
Field Summary | |
private static StaticMaker |
ConstListMaker
Initialized lazily to avoid circular initialization. |
private static Object[] |
EmptyArray
|
static ConstList |
EmptyList
Enabled: The canonical empty ConstList |
private static long |
serialVersionUID
|
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) |
ConstList()
Only subclasses within the package |
Method Summary | |
Object[] |
__optUncall()
Enabled: Ensure the public overrides in non-public subclasses are actually public. |
void |
__printOn(TextWriter out)
Enabled: Prints using E list syntax |
boolean |
accepts(Object specimen)
Enabled: Virtually inherit from BaseGuard |
Guard |
and(Guard other)
Enabled: |
Guard |
butNot(Guard other)
Enabled: |
Object |
coerce(Object specimen)
Enabled: Virtually inherit from BaseGuard |
Object |
coerce(Object specimen,
OneArgFunc optEjector)
Enabled: Given that this list is a list of ValueGuards and that the specimen is a ConstList of the same size, coerces each element of specimen by the corresponding element of myself and return a ConstList of the resulting values. |
double |
compareTo(ConstList other)
Enabled: Ordered by lexicographic ordering of the elements. |
double |
compareTo(ConstList other,
CompFunc compFunc)
Enabled: Like one-arg compareTo, but uses the provided compFunc to compare the elements. |
static ConstList |
fromArray(Object oldArray)
Enabled: |
static ConstList |
fromArray(Object oldArray,
int start,
int bound)
Enabled: |
Guard |
get()
Enabled: Virtually inherit from BaseGuard |
static StaticMaker |
GetMaker()
Enabled: |
String |
getName()
Enabled: |
Slot |
makeSlot(Object specimen)
Enabled: Virtually inherit from BaseGuard |
Slot |
makeSlot(Object specimen,
OneArgFunc optEjector)
Enabled: Virtually inherit from BaseGuard |
static Object |
match(String verb,
ConstList args)
Suppressed: This defines the matcher of the ConstListMaker -- the StaticMaker on the class ConstList -- to respond to a "run" method of any arity by returning the list of arguments as a list. |
Guard |
not()
Enabled: |
Guard |
or(Guard other)
Enabled: |
EList |
readOnly()
Enabled: Just returns itself |
ConstList |
snapshot()
Enabled: Just returns itself |
Guard |
xor(Guard other)
Enabled: |
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, 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 |
Methods inherited from interface org.erights.e.elib.tables.Selfless |
getSpreadUncall |
Field Detail |
private static final long serialVersionUID
private static StaticMaker ConstListMaker
private static final Object[] EmptyArray
public static final ConstList EmptyList
Constructor Detail |
ConstList()
Method Detail |
public static StaticMaker GetMaker()
public static ConstList fromArray(Object oldArray)
public static ConstList fromArray(Object oldArray, int start, int bound)
public static Object match(String verb, ConstList args) throws NoSuchMethodException
If this were a method of an instance, we'd declare the instance to
implement org.erights.e.elib.prim.JMatcher
.
verb
- args
-
NoSuchMethodException
- if the verb isn't "run"public ConstList snapshot()
snapshot
in class EList
public EList readOnly()
readOnly
in class EList
public double compareTo(ConstList other)
public double compareTo(ConstList other, CompFunc compFunc)
public String getName()
getName
in interface SlotGuard
public Object coerce(Object specimen, OneArgFunc optEjector)
Redundant with org.erights.e.elib.slot.TupleGuard
. Should
refactor ConstList to delegate to TupleGuard.
coerce
in interface ValueGuard
public Object coerce(Object specimen)
coerce
in interface Guard
public boolean accepts(Object specimen)
accepts
in interface Guard
public Slot makeSlot(Object specimen)
makeSlot
in interface Guard
public Slot makeSlot(Object specimen, OneArgFunc optEjector)
makeSlot
in interface SlotGuard
public Guard get()
get
in interface Guard
public Guard or(Guard other)
or
in interface Guard
other
-
public Guard and(Guard other)
and
in interface Guard
other
-
public Guard not()
not
in interface Guard
public Guard butNot(Guard other)
butNot
in interface Guard
other
-
public Guard xor(Guard other)
xor
in interface Guard
other
-
public Object[] __optUncall()
The default implementation here just delegates to
MirandaMethods.__optUncall(java.lang.Object)
.
public void __printOn(TextWriter out) throws IOException
__printOn
in interface EPrintable
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |