Class Where


  • public final class Where
    extends java.lang.Object
    The Where class describes a location in a source file.
    • Constructor Summary

      Constructors 
      Constructor Description
      Where​(java.lang.String unit, int line, int position)
      Constructs the object from unit name, line number and position.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int getLine()
      Returns the line number.
      int getPosition()
      Returns the position in the line.
      java.lang.String getUnit()
      Returns the name of the source file (unit).
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Where

        public Where​(java.lang.String unit,
                     int line,
                     int position)
        Constructs the object from unit name, line number and position.
        Parameters:
        unit - Source file (unit) name.
        line - Number of the line.
        position - Position in the line.
    • Method Detail

      • getUnit

        public java.lang.String getUnit()
        Returns the name of the source file (unit).
        Returns:
        Source file (unit) name.
      • getLine

        public int getLine()
        Returns the line number.
        Returns:
        Line number.
      • getPosition

        public int getPosition()
        Returns the position in the line.
        Returns:
        Position in the line.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object