hudson.plugins.checkstyle.util.model
Class LineRange

java.lang.Object
  extended by hudson.plugins.checkstyle.util.model.LineRange
All Implemented Interfaces:
java.io.Serializable

public class LineRange
extends java.lang.Object
implements java.io.Serializable

A line range in a source file is defined by its first and last line.

Author:
Ulli Hafner
See Also:
Serialized Form

Constructor Summary
LineRange(int line)
          Creates a new instance of LineRange.
LineRange(int start, int end)
          Creates a new instance of LineRange.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 int getEnd()
          Returns the last line of this range.
 int getStart()
          Returns the first line of this range.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineRange

public LineRange(int line)
Creates a new instance of LineRange. This range represents a single line.

Parameters:
line - the first and last line of the range

LineRange

public LineRange(int start,
                 int end)
Creates a new instance of LineRange.

Parameters:
start - start of the range
end - end of the range
Method Detail

getStart

public int getStart()
Returns the first line of this range.

Returns:
the first line of this range

getEnd

public int getEnd()
Returns the last line of this range.

Returns:
the last line of this range

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


Copyright © 2009. All Rights Reserved.