EList
From Erights
(Difference between revisions)
(fix XXXes) |
Kevin Reid (Talk | contribs) (add autogen headings and some manual) |
||
Line 1: | Line 1: | ||
- | + | [[EList]] is the abstract supertype ({{XXX}} establish terminology: supertype or superclass?) of [[ConstList]], [[FlexList]], and [[ReadOnlyList]]. ({{XXX}} complete list?) | |
All indexing is zero-based. All ranges are specified as beginning index, inclusive, to ending index, exclusive (not inclusive end or location and size). | All indexing is zero-based. All ranges are specified as beginning index, inclusive, to ending index, exclusive (not inclusive end or location and size). | ||
+ | ? def abcd := {{{fromConst|__identityFunc}}}(["a", "b", "c", "d"]); null | ||
+ | |||
==Protocol== | ==Protocol== | ||
- | |||
- | |||
{{XXX|Used a program to generate this list of msgdoc headers from E-on-Java. Clean up and write specs.}} | {{XXX|Used a program to generate this list of msgdoc headers from E-on-Java. Clean up and write specs.}} | ||
- | + | {{instance msgdoc|add|1|<var>_</var> :null|[[nullOk[ConstList]]]}} | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | {{instance msgdoc| | + | {{instance msgdoc|asKeys|0||[[nullOk[ConstMap]]]}} |
- | + | {{instance msgdoc|asMap|0||[[nullOk[ConstMap]]]}} | |
- | + | {{instance msgdoc|asSet|0||[[nullOk[ConstSet]]]}} | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | {{instance msgdoc| | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
{{instance msgdoc|contains|1|<var>_</var> :null|[[Boolean]]}} | {{instance msgdoc|contains|1|<var>_</var> :null|[[Boolean]]}} | ||
- | {{instance msgdoc|diverge|0||[[FlexList]]}} | + | {{instance msgdoc|diverge|0||[[nullOk[FlexList]]]}} |
- | {{instance msgdoc|diverge|1|<var>_</var> :[ | + | {{instance msgdoc|diverge|1|<var>_</var> :nullOk[Class]|[[nullOk[FlexList]]]}} |
- | {{instance msgdoc|fetch|2|<var> | + | {{instance msgdoc|fetch|2|<var>_</var> :int32, <var>_</var> :nullOk[Thunk]|[[any]]}} |
{{instance msgdoc|get|1|<var>index</var> :[[Integer]]|<var>valueType</var>}} | {{instance msgdoc|get|1|<var>index</var> :[[Integer]]|<var>valueType</var>}} | ||
Line 78: | Line 45: | ||
{{instance msgdoc|getArray|1|<var>_</var> :nullOk[Class]|[[any]]}} | {{instance msgdoc|getArray|1|<var>_</var> :nullOk[Class]|[[any]]}} | ||
- | {{instance msgdoc|getArray|3|<var>_</var> :nullOk[Class], <var>_</var> : | + | {{instance msgdoc|getArray|3|<var>_</var> :nullOk[Class], <var>_</var> :int32, <var>_</var> :int32|[[any]]}} |
{{instance msgdoc|includes|1|<var>_</var> :nullOk[EList]|[[Boolean]]}} | {{instance msgdoc|includes|1|<var>_</var> :nullOk[EList]|[[Boolean]]}} | ||
- | {{instance msgdoc|indexOf1|1|<var>_</var>|[[ | + | {{instance msgdoc|indexOf1|1|<var>_</var> :null|[[int32]]}} |
- | {{instance msgdoc|indexOf1|2|<var>_</var>, <var>_</var> : | + | {{instance msgdoc|indexOf1|2|<var>_</var> :null, <var>_</var> :int32|[[int32]]}} |
- | {{instance msgdoc|iterate|1|<var> | + | {{instance msgdoc|iterate|1|<var>_</var> :nullOk[AssocFunc]|[[void]]}} |
{{instance msgdoc|last|0||[[any]]}} | {{instance msgdoc|last|0||[[any]]}} | ||
- | {{instance msgdoc|lastIndexOf1|1|<var>_</var>|[[ | + | {{instance msgdoc|lastIndexOf1|1|<var>_</var> :null|[[int32]]}} |
- | {{instance msgdoc|lastIndexOf1|2|<var>_</var>, <var>_</var> : | + | {{instance msgdoc|lastIndexOf1|2|<var>_</var> :null, <var>_</var> :int32|[[int32]]}} |
- | {{instance msgdoc|lastStartOf|1|<var>_</var> : | + | {{instance msgdoc|lastStartOf|1|<var>_</var> :nullOk[EList]|[[int32]]}} |
- | {{instance msgdoc|lastStartOf|2|<var>_</var> : | + | {{instance msgdoc|lastStartOf|2|<var>_</var> :nullOk[EList], <var>_</var> :int32|[[int32]]}} |
- | {{instance msgdoc|multiply|1|<var>_</var> :[[ | + | {{instance msgdoc|multiply|1|<var>_</var> :int32|[[nullOk[ConstList]]]}} |
- | {{instance msgdoc|printOn|4|<var>_</var> :String, <var>_</var> :String, <var>_</var> :String, <var> | + | {{instance msgdoc|printOn|4|<var>_</var> :nullOk[String], <var>_</var> :nullOk[String], <var>_</var> :nullOk[String], <var>_</var> :nullOk[TextWriter]|[[void]]}} |
- | {{instance msgdoc|readOnly|0||[[EList]]}} | + | {{instance msgdoc|readOnly|0||[[nullOk[EList]]]}} |
- | + | ||
- | + | ||
{{instance msgdoc|run|2|<var>start</var> :[[Integer]], <var>end</var> :[[Integer]]}} :[[ConstList]] | {{instance msgdoc|run|2|<var>start</var> :[[Integer]], <var>end</var> :[[Integer]]}} :[[ConstList]] | ||
Line 110: | Line 75: | ||
Return a ConstList containing the subsequence of elements in this list starting with element index <var>start</var> and ending with the element before index <var>end</var>. | Return a ConstList containing the subsequence of elements in this list starting with element index <var>start</var> and ending with the element before index <var>end</var>. | ||
- | ? abcd.run(1, 3) | + | ? abcd.run(1, 3) |
# value: ["b", "c"] | # value: ["b", "c"] | ||
- | ? abcd.run(0, abcd.size()) | + | ? abcd.run(0, abcd.size()) |
# value: ["a", "b", "c", "d"] | # value: ["a", "b", "c", "d"] | ||
? ESpec.requireWrongArgsFail(abcd, "run", [0..!(abcd.size()), 0..!(abcd.size())]) | ? ESpec.requireWrongArgsFail(abcd, "run", [0..!(abcd.size()), 0..!(abcd.size())]) | ||
- | {{XXX | + | {{XXX the above 'ESpec' is an idea about defining some utilities |
{{instance msgdoc|run|1|<var>start</var> :[[Integer]]|[[ConstList]]}} | {{instance msgdoc|run|1|<var>start</var> :[[Integer]]|[[ConstList]]}} | ||
Line 123: | Line 88: | ||
{{specbycode|{{this}}.run(<var>start</var>, {{this}}.size())}} | {{specbycode|{{this}}.run(<var>start</var>, {{this}}.size())}} | ||
- | ? abcd.run(1) | + | ? abcd.run(1) |
# value: ["b", "c", "d"] | # value: ["b", "c", "d"] | ||
- | ? abcd.run(0) | + | ? abcd.run(0) |
# value: ["a", "b", "c", "d"] | # value: ["a", "b", "c", "d"] | ||
- | {{instance msgdoc|size|0||[[ | + | {{instance msgdoc|size|0||[[int32]]}} |
- | + | {{instance msgdoc|snapshot|0||[[nullOk[ConstList]]]}} | |
- | + | {{instance msgdoc|sort|0||[[nullOk[ConstList]]]}} | |
- | + | ||
- | + | {{instance msgdoc|sort|1|<var>_</var> :nullOk[CompFunc]|[[nullOk[ConstList]]]}} | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | {{instance msgdoc|sort|1|<var>_</var> : | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | {{ | + | {{instance msgdoc|startOf|1|<var>_</var> :nullOk[EList]|[[int32]]}} |
- | {{instance msgdoc| | + | {{instance msgdoc|startOf|2|<var>_</var> :nullOk[EList], <var>_</var> :int32|[[int32]]}} |
- | + | {{instance msgdoc|valueType|0||[[nullOk[Class]]]}} | |
- | + | {{instance msgdoc|with|1|<var>_</var> :null|[[nullOk[ConstList]]]}} | |
- | + | ||
- | + | ||
- | {{ | + | {{instance msgdoc|with|2|<var>_</var> :int32, <var>_</var> :null|[[nullOk[ConstList]]]}} |
- | |||
[[Category:ELib specification]] | [[Category:ELib specification]] | ||
{{stub}} | {{stub}} | ||
- |
Revision as of 03:33, 16 March 2009
EList is the abstract supertype (XXX establish terminology: supertype or superclass?) of ConstList, FlexList, and ReadOnlyList. (XXX complete list?)
All indexing is zero-based. All ranges are specified as beginning index, inclusive, to ending index, exclusive (not inclusive end or location and size).
? def abcd := __identityFunc(["a", "b", "c", "d"]); null
Protocol
XXX Used a program to generate this list of msgdoc headers from E-on-Java. Clean up and write specs.
add/1
- Signature: add(_ :null) :[[nullOk[ConstList]]]
asKeys/0
- Signature: asKeys() :[[nullOk[ConstMap]]]
asMap/0
- Signature: asMap() :[[nullOk[ConstMap]]]
asSet/0
- Signature: asSet() :[[nullOk[ConstSet]]]
contains/1
- Signature: contains(_ :null) :Boolean
diverge/0
- Signature: diverge() :[[nullOk[FlexList]]]
diverge/1
- Signature: diverge(_ :nullOk[Class]) :[[nullOk[FlexList]]]
fetch/2
- Signature: fetch(_ :int32, _ :nullOk[Thunk]) :any
get/1
- Signature: get(index :Integer) :valueType
Return the element at index.
? abcd[0] # value: "a" ? abcd[2] # value: "c" ? abcd[-1] # problem: <XXX specify form of error> ? abcd[4] # problem: <XXX specify form of error>
getArray/0
- Signature: getArray() :any
getArray/1
- Signature: getArray(_ :nullOk[Class]) :any
getArray/3
- Signature: getArray(_ :nullOk[Class], _ :int32, _ :int32) :any
includes/1
- Signature: includes(_ :nullOk[EList]) :Boolean
indexOf1/1
- Signature: indexOf1(_ :null) :int32
indexOf1/2
- Signature: indexOf1(_ :null, _ :int32) :int32
iterate/1
- Signature: iterate(_ :nullOk[AssocFunc]) :void
last/0
- Signature: last() :any
lastIndexOf1/1
- Signature: lastIndexOf1(_ :null) :int32
lastIndexOf1/2
- Signature: lastIndexOf1(_ :null, _ :int32) :int32
lastStartOf/1
- Signature: lastStartOf(_ :nullOk[EList]) :int32
lastStartOf/2
- Signature: lastStartOf(_ :nullOk[EList], _ :int32) :int32
multiply/1
- Signature: multiply(_ :int32) :[[nullOk[ConstList]]]
printOn/4
- Signature: printOn(_ :nullOk[String], _ :nullOk[String], _ :nullOk[String], _ :nullOk[TextWriter]) :void
readOnly/0
- Signature: readOnly() :[[nullOk[EList]]]
run/2
Return a ConstList containing the subsequence of elements in this list starting with element index start and ending with the element before index end.
? abcd.run(1, 3) # value: ["b", "c"] ? abcd.run(0, abcd.size()) # value: ["a", "b", "c", "d"] ? ESpec.requireWrongArgsFail(abcd, "run", [0..!(abcd.size()), 0..!(abcd.size())])
{{XXX the above 'ESpec' is an idea about defining some utilities
run/1
Equivalent to thisEList.run(start, thisEList.size())
.
? abcd.run(1) # value: ["b", "c", "d"] ? abcd.run(0) # value: ["a", "b", "c", "d"]
size/0
- Signature: size() :int32
snapshot/0
- Signature: snapshot() :[[nullOk[ConstList]]]
sort/0
- Signature: sort() :[[nullOk[ConstList]]]
sort/1
- Signature: sort(_ :nullOk[CompFunc]) :[[nullOk[ConstList]]]
startOf/1
- Signature: startOf(_ :nullOk[EList]) :int32
startOf/2
- Signature: startOf(_ :nullOk[EList], _ :int32) :int32
valueType/0
- Signature: valueType() :[[nullOk[Class]]]
with/1
- Signature: with(_ :null) :[[nullOk[ConstList]]]
with/2
- Signature: with(_ :int32, _ :null) :[[nullOk[ConstList]]]
- This page is a stub; it should be expanded with more information. If doing so, check the original E web site and the mailing list archives for content which could be moved into this page.
Categories: XXX | Message add/1 | Message asKeys/0 | Message asMap/0 | Message asSet/0 | Message contains/1 | Message diverge/0 | Message diverge/1 | Message fetch/2 | Message get/1 | Message getArray/0 | Message getArray/1 | Message getArray/3 | Message includes/1 | Message indexOf1/1 | Message indexOf1/2 | Message iterate/1 | Message last/0 | Message lastIndexOf1/1 | Message lastIndexOf1/2 | Message lastStartOf/1 | Message lastStartOf/2 | Message multiply/1 | Message printOn/4 | Message readOnly/0 | Message run/2 | Message run/1 | Message size/0 | Message snapshot/0 | Message sort/0 | Message sort/1 | Message startOf/1 | Message startOf/2 | Message valueType/0 | Message with/1 | Message with/2 | ELib specification | Stubs