gnu.lists
public class LList extends ExtSequence implements Sequence, Externalizable, Comparable
Field Summary | |
---|---|
static LList | Empty |
Constructor Summary | |
---|---|
LList() Do not use - only public for serialization! |
Method Summary | |
---|---|
static Pair | chain1(Pair old, Object arg1) Utility function used by compiler when inlining `list'. |
static Pair | chain4(Pair old, Object arg1, Object arg2, Object arg3, Object arg4) Utility function used by compiler when inlining `list'. |
static Object | checkNonList(Object rest) Helper to protect against pathological LLists (neithr Pair nor Empty). |
int | compareTo(Object obj) |
void | consume(Consumer out) |
static Object | consX(Object[] args) SRFI-1's cons* and Common Lisp's list* function. |
int | createPos(int index, boolean isAfter) |
int | createRelativePos(int pos, int delta, boolean isAfter) |
boolean | equals(Object obj) |
Object | get(int index) |
SeqPosition | getIterator(int index) |
Object | getPosNext(int ipos) |
Object | getPosPrevious(int ipos) |
boolean | hasNext(int ipos) |
boolean | isEmpty() |
static int | length(Object arg) |
static Pair | list1(Object arg1) |
static Pair | list2(Object arg1, Object arg2) |
static Pair | list3(Object arg1, Object arg2, Object arg3) |
static Pair | list4(Object arg1, Object arg2, Object arg3, Object arg4) |
static int | listLength(Object obj, boolean allowOtherSequence)
A safe function to count the length of a list. |
static Object | listTail(Object list, int count) |
static LList | makeList(List vals) |
static LList | makeList(Object[] vals, int offset, int length) |
static LList | makeList(Object[] vals, int offset) |
int | nextPos(int ipos) |
void | readExternal(ObjectInput in) |
Object | readResolve() |
static LList | reverseInPlace(Object list) Reverse a list in place, by modifying the cdr fields. |
protected void | setPosNext(int ipos, Object value) |
protected void | setPosPrevious(int ipos, Object value) |
int | size() |
String | toString() |
void | writeExternal(ObjectOutput out) |
Parameters: obj the putative list to measure allowOtherSequence if a non-List Sequence is seen, allow that
Returns: the length, or -1 for a circular list, or -2 for an improper list
Serial Data: Write nothing. (Don't need to write anything.)