public class CLITools extends Object
Created by Jeff Gaynor
on Jun 25, 2010 at 2:15:40 PM
Constructor and Description |
---|
CLITools() |
Modifier and Type | Method and Description |
---|---|
static OutputStream |
getOutputStream() |
protected static PrintWriter |
getPrintWriter() |
static int |
listChoose(String head,
List options,
int defaultChoice)
Convenience method to give a list of choices from a set of options.
|
static int |
listChoose(String head,
Object[] options)
This displays the head then each of the list choices which are numbered.
|
static int |
listChoose(String head,
Object[] options,
int defaultChoice) |
static String |
prompt(String prompt,
Object defaultValue)
A utility for getting user input.
|
static void |
say(Object obj,
String x)
Very useful for debugging.
|
static void |
say(String x) |
static void |
setOutputStream(OutputStream outputStream) |
public static String prompt(String prompt, Object defaultValue)
prompt
- defaultValue
- public static OutputStream getOutputStream()
public static void setOutputStream(OutputStream outputStream)
protected static PrintWriter getPrintWriter()
public static void say(String x)
public static void say(Object obj, String x)
obj
- x
- public static int listChoose(String head, Object[] options)
toString
method for the object.head
- options
- Copyright © 2019. All Rights Reserved.