Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.puppycrawl.tools.checkstyle.checks.indentation
Class LineSet  view LineSet download LineSet.java

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.checks.indentation.LineSet

public class LineSet
extends java.lang.Object

Represents a set of lines.


Field Summary
private  java.util.SortedMap mLines
          Maps line numbers to their start column.
 
Constructor Summary
LineSet()
           
 
Method Summary
 void addLineAndCol(java.lang.Integer aLineNum, int aCol)
          Add a line to this set of lines.
 int firstLine()
          Get the line number of the first line.
 int firstLineCol()
          Get the starting column for the first line.
 java.lang.Integer getStartColumn(java.lang.Integer aLineNum)
          Get the starting column for a given line number.
 boolean isEmpty()
          Determines if this set of lines is empty.
 int lastLine()
          Get the line number of the last line.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mLines

private java.util.SortedMap mLines
Maps line numbers to their start column.

Constructor Detail

LineSet

public LineSet()
Method Detail

getStartColumn

public java.lang.Integer getStartColumn(java.lang.Integer aLineNum)
Get the starting column for a given line number.


firstLineCol

public int firstLineCol()
Get the starting column for the first line.


firstLine

public int firstLine()
Get the line number of the first line.


lastLine

public int lastLine()
Get the line number of the last line.


addLineAndCol

public void addLineAndCol(java.lang.Integer aLineNum,
                          int aCol)
Add a line to this set of lines.


isEmpty

public boolean isEmpty()
Determines if this set of lines is empty.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).