Codota Logo
TextIO.newGenericInputReader
Code IndexAdd Codota to your IDE (free)

How to use
newGenericInputReader
method
in
org.beryx.textio.TextIO

Best Java code snippets using org.beryx.textio.TextIO.newGenericInputReader (Showing top 4 results out of 315)

  • Common ways to obtain TextIO
private void myMethod () {
TextIO t =
  • Codota IconTextTerminal textTerminal;new TextIO(textTerminal)
  • Smart code suggestions by Codota
}
origin: mars-sim/mars-sim

  private static BiConsumer<TextIO, RunnerData> chooseMenu(TextIO textIO) {
    List<BiConsumer<TextIO, RunnerData>> apps = Arrays.asList(
        chatMenu,
        new AutosaveMenu(),
        new SaveMenu(),
        new TimeRatioMenu(),
//                new Weather(),
        new ExitMenu()
    );
        BiConsumer<TextIO, RunnerData> app = textIO.<BiConsumer<TextIO, RunnerData>>newGenericInputReader(null)
      .withNumberedPossibleValues(apps)
      .read(System.lineSeparator() 
          + "-------------------  C O N S O L E   M E N U  -------------------" 
          + System.lineSeparator());
    String propsFileName = app.getClass().getSimpleName() + ".properties";
    System.setProperty(AbstractTextTerminal.SYSPROP_PROPERTIES_FILE_LOCATION, propsFileName);
//        profile.term().moveToLineStart();        
    return app;
  }
  
origin: beryx/text-io

private static BiConsumer<TextIO, RunnerData> chooseApp(TextIO textIO) {
  List<BiConsumer<TextIO, RunnerData>> apps = Arrays.asList(
      new UserDataCollector(),
      new ECommerce(),
      new Cuboid(),
      new Weather(),
      new ShoppingList(),
      new ContactInfo()
  );
  BiConsumer<TextIO, RunnerData> app = textIO.<BiConsumer<TextIO, RunnerData>>newGenericInputReader(null)
    .withNumberedPossibleValues(apps)
    .read("Choose the application to be run");
  String propsFileName = app.getClass().getSimpleName() + ".properties";
  System.setProperty(AbstractTextTerminal.SYSPROP_PROPERTIES_FILE_LOCATION, propsFileName);
  return app;
}
origin: beryx/text-io

private static TextIoApp<?> createTextIoApp(TextIO textIO, BiConsumer<TextIO, RunnerData> app, WebTextTerminal webTextTerm) {
  class Provider {
    private final String name;
    private final Supplier<TextIoApp<?>> supplier;
    private Provider(String name, Supplier<TextIoApp<?>> supplier) {
      this.name = name;
      this.supplier = supplier;
    }
    @Override
    public String toString() {
      return name;
    }
  }
  Provider textIoAppProvider = textIO.<Provider>newGenericInputReader(null)
      .withNumberedPossibleValues(
        new Provider("Ratpack", () -> new RatpackTextIoApp(app, webTextTerm)),
        new Provider("Spark", () -> new SparkTextIoApp(app, webTextTerm))
      )
      .read("\nChoose the web framework to be used");
  return textIoAppProvider.supplier.get();
}
origin: beryx/text-io

TextIO textIO = new TextIO(terminal);
while(true) {
  TextTerminalProvider terminalProvider = textIO.<TextTerminalProvider>newGenericInputReader(null)
      .withNumberedPossibleValues(
          new NamedProvider("Default terminal (provided by TextIoFactory)", TextIoFactory::getTextTerminal),
org.beryx.textioTextIOnewGenericInputReader

Popular methods of TextIO

  • <init>
  • dispose
  • getTextTerminal
  • newBooleanInputReader
  • newDoubleInputReader
  • newIntInputReader
  • newStringInputReader
  • newEnumInputReader
  • newLongInputReader

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now