public interface Text_To_WrappedFormat extends IsTransformer<String,Pair<ArrayList<String>,ArrayList<String>>>
Takes some text and returns formatted text with optionally different width for top/bottom.
| Modifier and Type | Field and Description |
|---|---|
static String |
LINEBREAK
The line break used for conditional line breaks.
|
| Modifier and Type | Method and Description |
|---|---|
static Pair<ArrayList<String>,ArrayList<String>> |
convert(String text,
int width)
Transforms text to wrapped lines.
|
static Pair<ArrayList<String>,ArrayList<String>> |
convert(String text,
int width,
Pair<Integer,Integer> top)
Transforms text to wrapped lines.
|
static Text_To_WrappedFormat |
create(int width)
Returns a new transformer.
|
static Text_To_WrappedFormat |
create(int width,
Pair<Integer,Integer> top)
Returns a new transformer.
|
default Pair<Integer,Integer> |
getTopSettings()
Returns the settings for the top part of the formatted text, defaults to null.
|
default int |
getWidth()
Returns the width for the overall wrapping, defaults to 80.
|
default Pair<ArrayList<String>,ArrayList<String>> |
transform(String input)
Transforms from one representation to another.
|
apply, transformstatic final String LINEBREAK
The line break used for conditional line breaks.
default int getWidth()
Returns the width for the overall wrapping, defaults to 80.
default Pair<Integer,Integer> getTopSettings()
Returns the settings for the top part of the formatted text, defaults to null.
default Pair<ArrayList<String>,ArrayList<String>> transform(String input)
TransformerTransforms from one representation to another.
static Text_To_WrappedFormat create(int width)
Returns a new transformer.
width - the width to wrap lines forstatic Text_To_WrappedFormat create(int width, Pair<Integer,Integer> top)
Returns a new transformer.
width - the width to wrap lines fortop - the settings for top as pair of lines and widthstatic Pair<ArrayList<String>,ArrayList<String>> convert(String text, int width)
Transforms text to wrapped lines.
text - the text to transformwidth - the width to wrap lines forstatic Pair<ArrayList<String>,ArrayList<String>> convert(String text, int width, Pair<Integer,Integer> top)
Transforms text to wrapped lines.
text - the text to transformwidth - the width to wrap lines fortop - the settings for top as pair of lines and widthCopyright © 2016–2017. All rights reserved.