joeq.Class
Class jq_LineNumberBC

java.lang.Object
  extended by joeq.Class.jq_LineNumberBC
All Implemented Interfaces:
Comparable

public class jq_LineNumberBC
extends Object
implements Comparable

This class matches bytecode indices to line numbers. It implements the Comparable interface; objects are compared based on their starting bytecode indices.

Version:
$Id: jq_LineNumberBC.java 2091 2005-01-08 22:53:02Z joewhaley $
Author:
John Whaley

Constructor Summary
jq_LineNumberBC(char startPC, char lineNum)
          Constructs a new jq_LineNumberBC object with the given starting bytecode index and line number.
 
Method Summary
 int compareTo(jq_LineNumberBC that)
          Compares this jq_LineNumberBC object to the given jq_LineNumberBC object.
 int compareTo(Object that)
           
 boolean equals(jq_LineNumberBC that)
          Compares this jq_LineNumberBC object to the given jq_LineNumberBC object.
 boolean equals(Object that)
           
 char getLineNum()
          Returns the line number.
 char getStartPC()
          Returns the start bytecode index.
 int hashCode()
           
 String toString()
          Returns a string representation of this jq_LineNumberBC object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

jq_LineNumberBC

public jq_LineNumberBC(char startPC,
                       char lineNum)
Constructs a new jq_LineNumberBC object with the given starting bytecode index and line number. The starting bytecode index is inclusive.

Parameters:
startPC - starting bytecode index, inclusive
lineNum - corresponding line number
Method Detail

getStartPC

public char getStartPC()
Returns the start bytecode index.

Returns:
start bytecode index

getLineNum

public char getLineNum()
Returns the line number.

Returns:
line number

compareTo

public int compareTo(jq_LineNumberBC that)
Compares this jq_LineNumberBC object to the given jq_LineNumberBC object. Comparisons are based on the start bytecode index value.

Parameters:
that - object to compare against
Returns:
-1 if this is less than given, 0 if same as given, 1 if greater than given

compareTo

public int compareTo(Object that)
Specified by:
compareTo in interface Comparable

equals

public boolean equals(jq_LineNumberBC that)
Compares this jq_LineNumberBC object to the given jq_LineNumberBC object. Comparisons are based on the start bytecode index value.

Parameters:
that - object to compare against
Returns:
true if objects are equal, false otherwise

equals

public boolean equals(Object that)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Returns a string representation of this jq_LineNumberBC object.

Overrides:
toString in class Object
Returns:
string representation


Copyright © 2001-2008 John Whaley. All Rights Reserved.