public class TextIOUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TextIOUtils.EmptyStringParser<T>
A textIO parser to use with
TextIO.newGenericInputReader(Function). |
| Constructor and Description |
|---|
TextIOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static PrintElement |
createPrintElement(String text,
String prefix) |
static List<PrintElement> |
createPrintElements(String... input)
Converts an array of text and prefix strings into
PrintElement objects. |
static PrintLine |
createPrintLine(String... input)
Converts an array of text and prefix strings into
PrintElement objects and does the exact same thing
as createPrintElements(String...) except it returns the result as a PrintLine. |
static void |
printElements(java.util.stream.Stream<PrintElement> printElements,
org.beryx.textio.TextIO textIO)
Prints the passed elements according to their respective prefix.
|
static void |
printLines(java.util.stream.Stream<PrintLine> records,
org.beryx.textio.TextIO textIO) |
public static void printLines(java.util.stream.Stream<PrintLine> records, org.beryx.textio.TextIO textIO)
public static List<PrintElement> createPrintElements(String... input)
PrintElement objects.
Note that the returned list is actually of type PrintLine and thus can safely be casted to this type if
required.input - An array of text and TextIO prefix identifiers, always as pairs in this order.public static PrintLine createPrintLine(String... input)
PrintElement objects and does the exact same thing
as createPrintElements(String...) except it returns the result as a PrintLine.
This is only for convenience to distinguish about arbitrary lists of print elements and lists that should
represent a line of output.input - An array of text and TextIO prefix identifiers, always as pairs in this order.public static PrintElement createPrintElement(String text, String prefix)
public static void printElements(java.util.stream.Stream<PrintElement> printElements, org.beryx.textio.TextIO textIO)
printElements - The elements to print.textIO - The textIO instance of output.Copyright © 2019 JULIE Lab, Germany. All rights reserved.