gnu.lists
Class PairWithPosition
java.lang.Object
gnu.lists.AbstractSequence
gnu.lists.ExtSequence
gnu.lists.LList
gnu.lists.Pair
gnu.lists.PairWithPosition
- All Implemented Interfaces:
- Consumable, Sequence, java.io.Externalizable, java.io.Serializable, java.lang.Comparable, java.lang.Iterable, java.util.Collection, java.util.List, javax.xml.transform.SourceLocator, org.xml.sax.Locator
public class PairWithPosition
- extends Pair
- implements SourceLocator
A Pair
with the file name and position it was read from.
- See Also:
- Serialized Form
Fields inherited from class gnu.lists.Pair |
car, cdr |
Fields inherited from interface gnu.lists.Sequence |
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 |
Methods inherited from class gnu.lists.Pair |
compareTo, compareTo, equals, equals, get, getPosNext, getPosPrevious, hashCode, hasNext, isEmpty, lastPair, length, make, nextPos, readResolve, size, toArray, toArray |
Methods inherited from class gnu.lists.LList |
chain1, chain4, checkNonList, consume, consX, createPos, createRelativePos, getIterator, length, list1, list2, list3, list4, listLength, listTail, makeList, makeList, makeList, reverseInPlace, setPosNext, setPosPrevious, toString |
Methods inherited from class gnu.lists.AbstractSequence |
add, add, addAll, addAll, addPos, clear, compare, compare, compare, consumeNext, consumePosRange, contains, containsAll, elements, endPos, equals, fill, fill, fillPosRange, firstAttributePos, firstChildPos, firstChildPos, fromEndIndex, get, getAttribute, getAttributeLength, getContainingSequenceSize, getEffectiveIndex, getIndexDifference, getIterator, getIteratorAtPos, getLowBound, getNextKind, getNextTypeName, getNextTypeObject, getSize, gotoAttributesStart, gotoChildrenStart, gotoParent, hasPrevious, indexOf, iterator, lastIndexOf, listIterator, listIterator, nextIndex, nextMatching, parentPos, previousPos, rank, remove, remove, removeAll, removePos, removePosRange, retainAll, set, set, stableCompare, startPos, subList, subSequence, subSequencePos, toString, unsupported, unsupportedException |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, subList |
PairWithPosition
public PairWithPosition()
- Only for serialization.
PairWithPosition
public PairWithPosition(SourceLocator where,
java.lang.Object car,
java.lang.Object cdr)
PairWithPosition
public PairWithPosition(java.lang.Object car,
java.lang.Object cdr)
setFile
public final void setFile(java.lang.String filename)
setLine
public final void setLine(int lineno,
int colno)
setLine
public final void setLine(int lineno)
getFileName
public final java.lang.String getFileName()
- Description copied from interface:
SourceLocator
- Normally same as getSystemId.
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicId
in interface javax.xml.transform.SourceLocator
- Specified by:
getPublicId
in interface org.xml.sax.Locator
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemId
in interface javax.xml.transform.SourceLocator
- Specified by:
getSystemId
in interface org.xml.sax.Locator
getLineNumber
public final int getLineNumber()
- Get the line number of (the start of) this Expression.
The "first" line is line 1; unknown is -1.
- Specified by:
getLineNumber
in interface javax.xml.transform.SourceLocator
- Specified by:
getLineNumber
in interface org.xml.sax.Locator
getColumnNumber
public final int getColumnNumber()
- Description copied from interface:
SourceLocator
- Return current column number.
The "first" column is column 1; unknown is -1.
- Specified by:
getColumnNumber
in interface javax.xml.transform.SourceLocator
- Specified by:
getColumnNumber
in interface org.xml.sax.Locator
isStableSourceLocation
public boolean isStableSourceLocation()
- Description copied from interface:
SourceLocator
- True if position is unlikely to change.
True for an expression but not an input file.
make
public static PairWithPosition make(java.lang.Object car,
java.lang.Object cdr,
java.lang.String filename,
int line,
int column)
make
public static PairWithPosition make(java.lang.Object car,
java.lang.Object cdr,
java.lang.String filename,
int position)
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Overrides:
writeExternal
in class Pair
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
- Overrides:
readExternal
in class Pair
- Throws:
java.io.IOException
java.lang.ClassNotFoundException