public class Pair extends LList implements java.io.Externalizable
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
car |
protected java.lang.Object |
cdr |
static Pair |
incompleteListMarker
A special pair used to indicate incomplete input.
|
noInts
ATTRIBUTE_VALUE, BOOLEAN_VALUE, CDATA_VALUE, CHAR_VALUE, COMMENT_VALUE, DOCUMENT_VALUE, DOUBLE_VALUE, ELEMENT_VALUE, EOF_VALUE, eofValue, FLOAT_VALUE, INT_S16_VALUE, INT_S32_VALUE, INT_S64_VALUE, INT_S8_VALUE, INT_U16_VALUE, INT_U32_VALUE, INT_U64_VALUE, INT_U8_VALUE, OBJECT_VALUE, PRIM_VALUE, PROCESSING_INSTRUCTION_VALUE, TEXT_BYTE_VALUE
Constructor and Description |
---|
Pair() |
Pair(java.lang.Object carval,
java.lang.Object cdrval) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object obj) |
static int |
compareTo(Pair pair1,
Pair pair2) |
boolean |
equals(java.lang.Object obj) |
static boolean |
equals(Pair pair1,
Pair pair2) |
java.lang.Object |
get(int index)
See java.util.List.
|
java.lang.Object |
getCar() |
java.lang.Object |
getCdr() |
java.lang.Object |
getPosNext(int ipos)
Get the element following the specified position.
|
java.lang.Object |
getPosPrevious(int ipos)
Get the element before the specified position.
|
boolean |
hasNext(int ipos) |
boolean |
isEmpty()
True is this sequence contains no elements.
|
Pair |
lastPair() |
int |
length() |
static Pair |
make(java.lang.Object car,
java.lang.Object cdr) |
int |
nextPos(int ipos)
Return the next position following the argument.
|
void |
readExternal(java.io.ObjectInput in) |
java.lang.Object |
readResolve()
Needed to override readResolve in LList.
|
void |
setCar(java.lang.Object car) |
void |
setCarBackdoor(java.lang.Object car)
May go away soon.
|
void |
setCdr(java.lang.Object cdr) |
void |
setCdrBackdoor(java.lang.Object cdr) |
int |
size()
See java.util.List.
|
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] arr) |
void |
writeExternal(java.io.ObjectOutput out) |
boundedHash, chain1, chain4, checkNonList, consume, consX, createPos, createRelativePos, getIterator, hashCode, length, list1, list2, list3, list4, listLength, makeList, makeList, makeList, reverseInPlace, setPosNext, setPosPrevious, toString
copyPos, isAfterPos, nextIndex, releasePos
add, add, addAll, addAll, addPos, asImmutable, badRank, checkCanWrite, checkRank, clear, compare, compare, compare, consume, consumeNext, consumePosRange, contains, containsAll, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, effectiveIndex, elements, endPos, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, get, get, get, getAttribute, getAttributeLength, getBooleanRaw, getByteRaw, getCharRaw, getContainingSequenceSize, getDoubleRaw, getElementKind, getFloatRaw, getIndexDifference, getInt, getInt, getInt, getInt, getInt, getIntRaw, getIterator, getIteratorAtPos, getLongRaw, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getRaw, getRowMajor, getShortRaw, getSize, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hasPrevious, indexOf, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextMatching, parentPos, previousPos, rank, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, setAt, setBuffer, setRaw, stableCompare, startPos, subList, subSequence, subSequencePos, toString, unsupported, unsupportedException
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
protected java.lang.Object car
protected java.lang.Object cdr
public static final Pair incompleteListMarker
public Pair(java.lang.Object carval, java.lang.Object cdrval)
public Pair()
public java.lang.Object getCar()
public java.lang.Object getCdr()
public void setCar(java.lang.Object car)
public void setCdr(java.lang.Object cdr)
public void setCarBackdoor(java.lang.Object car)
public void setCdrBackdoor(java.lang.Object cdr)
public int size()
Sequence
public boolean isEmpty()
Sequence
public int length()
public int nextPos(int ipos)
AbstractSequence
public java.lang.Object getPosNext(int ipos)
AbstractSequence
getPosNext
in class LList
ipos
- the specified position.public java.lang.Object getPosPrevious(int ipos)
AbstractSequence
getPosPrevious
in class LList
ipos
- the specified position.public Pair lastPair()
public int compareTo(java.lang.Object obj)
public java.lang.Object get(int index)
Sequence
public boolean equals(java.lang.Object obj)
public static Pair make(java.lang.Object car, java.lang.Object cdr)
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<java.lang.Object>
toArray
in interface java.util.List<java.lang.Object>
toArray
in class AbstractSequence<java.lang.Object>
public java.lang.Object[] toArray(java.lang.Object[] arr)
toArray
in interface java.util.Collection<java.lang.Object>
toArray
in interface java.util.List<java.lang.Object>
toArray
in class AbstractSequence<java.lang.Object>
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class LList
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class LList
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.Object readResolve() throws java.io.ObjectStreamException
readResolve
in class LList
java.io.ObjectStreamException