Package fmpp.tdd
Class Fragment
java.lang.Object
fmpp.tdd.Fragment
Fragment extracted from a TDD expression.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the file the text comes from (for informational purposes only).int
Returns the end index (exclusive) of the fragment in the text.int
Returns the start index of the fragment in the text.getText()
Returns the full TDD text that contains the fragmet.toString()
Returns the fragment text.
-
Constructor Details
-
Fragment
Creates new TDD fragment.- Parameters:
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 benull
if the source file is unknown or there is no source file.
-
-
Method Details
-
getFileName
Returns the name of the file the text comes from (for informational purposes only). It can benull
if the source file is unknown or there is no source file. -
getText
Returns the full TDD text that contains the fragmet. -
getFragmentStart
public int getFragmentStart()Returns the start index of the fragment in the text. -
getFragmentEnd
public int getFragmentEnd()Returns the end index (exclusive) of the fragment in the text. -
toString
Returns the fragment text.
-