metricsOverlay.model
Class MetricSection

java.lang.Object
  extended by metricsOverlay.model.MetricSection
All Implemented Interfaces:
java.lang.Comparable<MetricSection>

public class MetricSection
extends java.lang.Object
implements java.lang.Comparable<MetricSection>

This class represents a single metric section.

Version:
14/7/2009
Author:
Matthew Harward

Constructor Summary
MetricSection(int startLine, int startCol, int endLine, int endCol, java.lang.String value)
          This is the main constructor for a metric section.
MetricSection(int startLine, int endLine, int startCol, int endCol, java.lang.String value, java.lang.String actualText, java.lang.String annotation)
          Full constructor
 
Method Summary
 int compareTo(MetricSection o)
           
 java.lang.String getActualText()
           
 java.lang.String getAnnotation()
           
 int getEndCol()
           
 int getEndLine()
           
 int getStartCol()
           
 int getStartLine()
           
 java.lang.String getValue()
           
 boolean hasActualText()
           
 boolean hasAnnotation()
           
 void setActualText(java.lang.String actualText)
           
 void setAnnotation(java.lang.String annotation)
           
 void setEndCol(int endCol)
           
 void setEndLine(int endLine)
           
 void setStartCol(int startCol)
           
 void setStartLine(int startLine)
           
 void setValue(java.lang.String value)
           
 java.lang.String toString()
          Overridden toString method
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetricSection

public MetricSection(int startLine,
                     int startCol,
                     int endLine,
                     int endCol,
                     java.lang.String value)
              throws java.lang.Exception
This is the main constructor for a metric section.

Parameters:
startLine - the actual line this metric section starts on.
startCol - the actual column this metric section starts on.
endLine - the actual line this metric section ends on, must be equal or greater than the start line.
endCol - the actual column this metric section ends on. If the start line is equal to the end line, this value must be larger than or equal to the start col.
value - the value, in a String format, that this metric section has.
Throws:
java.lang.Exception - if any value is not valid

MetricSection

public MetricSection(int startLine,
                     int endLine,
                     int startCol,
                     int endCol,
                     java.lang.String value,
                     java.lang.String actualText,
                     java.lang.String annotation)
              throws java.lang.Exception
Full constructor

Throws:
java.lang.Exception
Method Detail

getEndLine

public int getEndLine()

setEndLine

public void setEndLine(int endLine)

getStartCol

public int getStartCol()

setStartCol

public void setStartCol(int startCol)

getEndCol

public int getEndCol()

setEndCol

public void setEndCol(int endCol)

getValue

public java.lang.String getValue()

setValue

public void setValue(java.lang.String value)

getStartLine

public int getStartLine()

setStartLine

public void setStartLine(int startLine)

getActualText

public java.lang.String getActualText()

setActualText

public void setActualText(java.lang.String actualText)

hasActualText

public boolean hasActualText()

hasAnnotation

public boolean hasAnnotation()

setAnnotation

public void setAnnotation(java.lang.String annotation)

getAnnotation

public java.lang.String getAnnotation()

toString

public java.lang.String toString()
Overridden toString method

Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(MetricSection o)
Specified by:
compareTo in interface java.lang.Comparable<MetricSection>