org.eclipse.xtext.xtend2.richstring
Class TextLine
java.lang.Object
  
org.eclipse.xtext.xtend2.richstring.TextLine
- All Implemented Interfaces: 
 - java.lang.CharSequence
 
- Direct Known Subclasses: 
 - TextLine.LeadingWSTextLinePart
 
public class TextLine
- extends java.lang.Object
- implements java.lang.CharSequence
  
Implementation CharSequence that is tailored to line-per-line processing of text
 and supports special handling of whitespace.
- Author:
 
  - Sebastian Zarnekow - Initial contribution and API
 
 
| 
Constructor Summary | 
TextLine(java.lang.String completeText,
         int offset,
         int length,
         int delimiterLength)
 
            | 
 
 
| Methods inherited from class java.lang.Object | 
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
 
TextLine
public TextLine(java.lang.String completeText,
                int offset,
                int length,
                int delimiterLength)
getCompleteText
public java.lang.String getCompleteText()
 
 
hasLeadingWhiteSpace
public boolean hasLeadingWhiteSpace()
 
 
containsOnlyWhitespace
public boolean containsOnlyWhitespace()
 
 
getLeadingWhiteSpace
public java.lang.CharSequence getLeadingWhiteSpace()
 
 
hasTrailingLineBreak
public boolean hasTrailingLineBreak()
 
 
getRelativeOffset
public int getRelativeOffset()
 
 
length
public int length()
- Specified by:
 length in interface java.lang.CharSequence
 
 
charAt
public char charAt(int index)
- Specified by:
 charAt in interface java.lang.CharSequence
 
 
getDelimiterLength
public int getDelimiterLength()
 
 
toString
public java.lang.String toString()
- Specified by:
 toString in interface java.lang.CharSequence- Overrides:
 toString in class java.lang.Object
 
 
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
 
 
subSequence
public java.lang.CharSequence subSequence(int start,
                                          int end)
- Specified by:
 subSequence in interface java.lang.CharSequence
 
- Throws:
 java.lang.IndexOutOfBoundsException - if start or end are negative,
          if end is greater than length(),
          or if start is greater than end
 
throwIndexOutOfBounds
protected void throwIndexOutOfBounds(int offset)