Package fmpp.tdd
Class Fragment
- java.lang.Object
-
- fmpp.tdd.Fragment
-
public class Fragment extends java.lang.Object
Fragment extracted from a TDD expression.
-
-
Constructor Summary
Constructors Constructor Description Fragment(java.lang.String text, int fragmentStart, int fragmentEnd, java.lang.String fileName)
Creates new TDD fragment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
Fragment
public Fragment(java.lang.String text, int fragmentStart, int fragmentEnd, java.lang.String fileName)
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 Detail
-
getFileName
public java.lang.String 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
public java.lang.String 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
public java.lang.String toString()
Returns the fragment text.- Overrides:
toString
in classjava.lang.Object
-
-