JavaScript is disabled on your browser.
Skip navigation links
gnu.lists

Class PairWithPosition

  • All Implemented Interfaces:
    BoundedHashable, Consumable, Sequence<java.lang.Object>, java.io.Externalizable, java.io.Serializable, java.lang.Comparable, java.lang.Iterable<java.lang.Object>, java.util.Collection<java.lang.Object>, java.util.List<java.lang.Object>, javax.xml.transform.SourceLocator, org.xml.sax.Locator
    Direct Known Subclasses:
    SyntaxForms.PairWithPositionSyntaxForm


    public class PairWithPosition
    extends ImmutablePair
    implements SourceLocator 
    A Pair with the file name and position it was read from. Note the position (start/end range) is actually that of the car part.
    See Also:
    Serialized Form
    • Constructor Detail

      • 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)
    • Method Detail

      • setFile

        public final void setFile(java.lang.String filename)
      • setLine

        public final void setLine(int lineno,
         int colno)
      • setEndLine

        public final void setEndLine(int endline,
         int endcolumn)
      • 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()
        Description copied from interface: SourceLocator
        Return current line number. Normally the same as getStartLine(). 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. Normally the same as getStartColumn(). 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
      • getStartLine

        public final int getStartLine()
        Description copied from interface: SourceLocator
        Line number (one-origin) of start of range; unknown/unspecified is -1.
      • getStartColumn

        public final int getStartColumn()
        Description copied from interface: SourceLocator
        Column (one-origin) of start of range; unknown/unspecified is -1.
      • getEndLine

        public final int getEndLine()
        Description copied from interface: SourceLocator
        Line number (one-origin) of end of range; unknown/unspecified is -1.
      • getEndColumn

        public final int getEndColumn()
        Description copied from interface: SourceLocator
        Column (one-origin) of end of range; unknown/unspecified is -1.
      • 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,
         long position)
      • init

        public void init(java.lang.Object car,
         java.lang.Object cdr,
         java.lang.String filename,
         long position)
        Should only be used when initializing a PairWithPosition instance.
      • 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
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /