Package com.g2forge.alexandria.java.text
Class TextUpdate.TextUpdateBuilder<O>
- java.lang.Object
-
- com.g2forge.alexandria.java.text.TextUpdate.TextUpdateBuilder<O>
-
- Enclosing class:
- TextUpdate<O>
public static class TextUpdate.TextUpdateBuilder<O> extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextUpdate<O>
build()
TextUpdate.TextUpdateBuilder<O>
function(IFunction1<? super CharSequence,? extends O> function)
A function from the contents of the region defined byTextUpdate.getOffset()
andTextUpdate.getLength()
to the value to replace it with.TextUpdate.TextUpdateBuilder<O>
length(int length)
The length of the input text region to replace.TextUpdate.TextUpdateBuilder<O>
offset(int offset)
The offset in the input text of the region to replace.String
toString()
-
-
-
Method Detail
-
offset
public TextUpdate.TextUpdateBuilder<O> offset(int offset)
The offset in the input text of the region to replace.- Parameters:
offset
- The offset in the input text of the region to replace.- Returns:
this
.
-
length
public TextUpdate.TextUpdateBuilder<O> length(int length)
The length of the input text region to replace. May be0
to insert something.- Parameters:
length
- The length of the input text region to replace.- Returns:
this
.
-
function
public TextUpdate.TextUpdateBuilder<O> function(IFunction1<? super CharSequence,? extends O> function)
A function from the contents of the region defined byTextUpdate.getOffset()
andTextUpdate.getLength()
to the value to replace it with. Depending on the consumer anull
or""
return value can be used to delete text.- Parameters:
function
- A function from the contents of this region to the value to replace it with.- Returns:
this
.
-
build
public TextUpdate<O> build()
-
-