kawigi.editor
Class Interval

java.lang.Object
  |
  +--kawigi.editor.Interval

public class Interval
extends java.lang.Object

Represents a block of code that is logically delimited (like by parentheses, curly braces, or other matched constructs).


Constructor Summary
Interval(int start, int end, int startind, int endind, java.lang.String name)
          Constructs a new Interval with the given fields.
 
Method Summary
 int getEndIndex()
          Returns the literal index in the string of code that the block ends on.
 int getEndLine()
          Returns the line number that the block ends on.
 java.lang.String getName()
          Returns the "name" of this block.
 int getStartIndex()
          Returns the literal index in the string that the block starts on.
 int getStartLine()
          Returns the line number that the block starts on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interval

public Interval(int start,
                int end,
                int startind,
                int endind,
                java.lang.String name)
Constructs a new Interval with the given fields.

Method Detail

getName

public java.lang.String getName()
Returns the "name" of this block. The name usually comes from somewhere right before the start of the block. It won't always have any meaning, but it will end in with the start and end delimiters that define the interval.


getStartLine

public int getStartLine()
Returns the line number that the block starts on. This includes the "title" of the block, if it's on a previous line.


getEndLine

public int getEndLine()
Returns the line number that the block ends on.


getStartIndex

public int getStartIndex()
Returns the literal index in the string that the block starts on. This doesn't include the title of the block.


getEndIndex

public int getEndIndex()
Returns the literal index in the string of code that the block ends on.