@Override public void accept(TextIO textIO, RunnerData runnerData) { TextTerminal<?> terminal = textIO.getTextTerminal(); String initData = (runnerData == null) ? null : runnerData.getInitData(); AppUtil.printGsonMessage(terminal, initData); String user = textIO.newStringInputReader() .withDefaultValue("admin") .read("Username"); String password = textIO.newStringInputReader() .withMinLength(6) .withInputMasking(true) .read("Password"); int age = textIO.newIntInputReader() .withMinVal(13) .read("Age"); Month month = textIO.newEnumInputReader(Month.class) .read("What month were you born in?"); terminal.printf("\nUser %s is %d years old, was born in %s and has the password %s.\n", user, age, month, password); textIO.newStringInputReader().withMinLength(0).read("\nPress enter to terminate..."); textIO.dispose("User '" + user + "' has left the building."); }