public class Fragment
extends java.lang.Object
Constructor and Description |
---|
Fragment(java.lang.String text,
int fragmentStart,
int fragmentEnd,
java.lang.String fileName)
Creates new TDD fragment.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFileName()
Returns the name of the file the text comes from (for informational
purposes only).
|
int |
getFragmentEnd()
Returns the end index (exclusive) of the fragment in the text.
|
int |
getFragmentStart()
Returns the start index of the fragment in the text.
|
java.lang.String |
getText()
Returns the full TDD text that contains the fragmet.
|
java.lang.String |
toString()
Returns the fragment text.
|
public Fragment(java.lang.String text, int fragmentStart, int fragmentEnd, java.lang.String fileName)
text
- the full TDD text that contains the fragment. (In extreme
case the fragment and the full text is the same.)fragmentStart
- the start index of the fragment in the text.fragmentEnd
- the start index of the fragment in the textfileName
- the name of the file the text comes from (for
informational purposes only). It can be null
if the source
file is unknown or there is no source file.public java.lang.String getFileName()
null
if the source file is unknown
or there is no source file.public java.lang.String getText()
public int getFragmentStart()
public int getFragmentEnd()
public java.lang.String toString()
toString
in class java.lang.Object