Class TextIOUtils.EmptyStringParser<T>

  • Type Parameters:
    T -
    All Implemented Interfaces:
    Function<String,​org.beryx.textio.InputReader.ParseResult<Object>>
    Enclosing class:
    TextIOUtils

    public static class TextIOUtils.EmptyStringParser<T>
    extends Object
    implements Function<String,​org.beryx.textio.InputReader.ParseResult<Object>>
    A textIO parser to use with TextIO.newGenericInputReader(Function). It will return null if an empty value is input (i.e. the user did immediately hit return) or the value delivered by a converter otherwise.
    • Field Detail

      • EMPTY_VALUE

        public static final Object EMPTY_VALUE
    • Constructor Detail

    • Method Detail

      • apply

        public org.beryx.textio.InputReader.ParseResult<Object> apply​(String s)
        Specified by:
        apply in interface Function<String,​org.beryx.textio.InputReader.ParseResult<Object>>