Creates a marker that indicates the start or end of a text block.
Creates a marker that indicates the start or end of a text block.
if a line and its number in the parsed text satisfy this predicate we set a marker at the position of the line
a marker that is placed where a line and its number in the parsed text satisfy the lineAndLineNrPredicate
Creates a marker that indicates the start or end of a text block.
Creates a marker that indicates the start or end of a text block.
if a line in the parsed text satisfies this predicate we set a marker at the position of the line
a marker that is placed where a line in the parsed text satisfies the linePredicate
Creates a marker that indicates the start or end of a text block.
Creates a marker that indicates the start or end of a text block.
if this string is equal to a line in the parsed text, we set a marker at the position of the line
a marker that is placed where the string in line
matches the line in the parsed text
Inheritance allows use to reuse the constructor code defined in
MarkerFactory
's apply methods. Alternatively, we could have used implicit conversions to turn, for example,from("start")
intofrom(BlockMarker((anInt: Int, aString: String) => "start".equals"))
and thus share constructors amongto
,from
, and the rest. The drawback of these conversions is that target typing is not available, requiring the user of this library to provide types explicitly, therefore having to writefrom((_: String).startsWith("start"))
instead offrom(_.startsWith("start"))
.