edu.neu.ccs.console
Class ConsoleGateway.ConsoleInputStream

java.lang.Object
  extended byedu.neu.ccs.console.ConsoleGateway.ConsoleInputStream
All Implemented Interfaces:
Serializable
Enclosing class:
ConsoleGateway

public class ConsoleGateway.ConsoleInputStream
extends Object
implements Serializable

Inner class of ConsoleGateway that provides input functionality for a console object. This class provides operations that use the mandatory input mode, or implement the iterative input design pattern.

Since:
1.0
Version:
2.3.1
See Also:
ConsoleGateway, Serialized Form

Field Summary
protected  StringableFactory factory
          Factory used to construct Stringable objects from input stream data.
 
Constructor Summary
ConsoleGateway.ConsoleInputStream()
           
 
Method Summary
 void demand(String prompt, Stringable obj)
          Sets the state of the given Stringable object by using the mandatory input model to acquire the data.
 void demand(String prompt, Stringable obj, StringableFilter filter)
          Sets the state of the given Stringable object by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 void demand(String prompt, String data, Stringable obj)
          Sets the state of the given Stringable object by using the mandatory input model to acquire the data with the given default data as a user option.
 void demand(String prompt, String data, Stringable obj, StringableFilter filter)
          Sets the state of the given Stringable object by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 BigDecimal demandBigDecimal(String prompt)
          Demands a BigDecimal value from the console, by using the mandatory input model to acquire the data.
 BigDecimal demandBigDecimal(String prompt, BigDecimal value)
          Demands a BigDecimal value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 BigDecimal demandBigDecimal(String prompt, BigDecimal value, StringableFilter filter)
          Demands a BigDecimal value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 BigDecimal demandBigDecimal(String prompt, StringableFilter filter)
          Demands a BigDecimal value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 BigInteger demandBigInteger(String prompt)
          Demands a BigInteger value from the console, by using the mandatory input model to acquire the data.
 BigInteger demandBigInteger(String prompt, BigInteger value)
          Demands a BigInteger value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 BigInteger demandBigInteger(String prompt, BigInteger value, StringableFilter filter)
          Demands a BigInteger value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 BigInteger demandBigInteger(String prompt, StringableFilter filter)
          Demands a BigInteger value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 boolean demandBoolean(String prompt)
          Demands a boolean value from the console, by using the mandatory input model to acquire the data.
 boolean demandBoolean(String prompt, boolean value)
          Demands a boolean value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 boolean demandBoolean(String prompt, boolean value, StringableFilter filter)
          Demands a boolean value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 boolean demandBoolean(String prompt, StringableFilter filter)
          Demands a boolean value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 byte demandByte(String prompt)
          Demands a byte value from the console, by using the mandatory input model to acquire the data.
 byte demandByte(String prompt, byte value)
          Demands a byte value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 byte demandByte(String prompt, byte value, StringableFilter filter)
          Demands a byte value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 byte demandByte(String prompt, StringableFilter filter)
          Demands a byte value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 char demandChar(String prompt)
          Demands a char value from the console, by using the mandatory input model to acquire the data.
 char demandChar(String prompt, char value)
          Demands a char value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 char demandChar(String prompt, char value, StringableFilter filter)
          Demands a char value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 char demandChar(String prompt, StringableFilter filter)
          Demands a char value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 Color demandColor(String prompt)
          Demands a Color value from the console, by using the mandatory input model to acquire the data.
 Color demandColor(String prompt, Color value)
          Demands a Color value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 Color demandColor(String prompt, Color value, StringableFilter filter)
          Demands a Color value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 Color demandColor(String prompt, StringableFilter filter)
          Demands a Color value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 double demandDouble(String prompt)
          Demands a double value from the console, by using the mandatory input model to acquire the data.
 double demandDouble(String prompt, double value)
          Demands a double value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 double demandDouble(String prompt, double value, StringableFilter filter)
          Demands a double value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 double demandDouble(String prompt, StringableFilter filter)
          Demands a double value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 float demandFloat(String prompt)
          Demands a float value from the console, by using the mandatory input model to acquire the data.
 float demandFloat(String prompt, float value)
          Demands a float value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 float demandFloat(String prompt, float value, StringableFilter filter)
          Demands a float value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 float demandFloat(String prompt, StringableFilter filter)
          Demands a float value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 int demandInt(String prompt)
          Demands a int value from the console, by using the mandatory input model to acquire the data.
 int demandInt(String prompt, int value)
          Demands a int value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 int demandInt(String prompt, int value, StringableFilter filter)
          Demands a int value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 int demandInt(String prompt, StringableFilter filter)
          Demands a int value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 long demandLong(String prompt)
          Demands a long value from the console, by using the mandatory input model to acquire the data.
 long demandLong(String prompt, long value)
          Demands a long value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 long demandLong(String prompt, long value, StringableFilter filter)
          Demands a long value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 long demandLong(String prompt, StringableFilter filter)
          Demands a long value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 Stringable demandObject(Class dataType, String prompt, String data, StringableFilter filter)
          Temporarily sets the data type for this stream to the given data type; creates a Stringable object by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result; restores the data type for this stream to its original setting; finally returns the object created.
 Stringable demandObject(String prompt)
          Returns a Stringable object created by using the mandatory input model to acquire the data.
 Stringable demandObject(String prompt, String data)
          Returns a Stringable object created by using the mandatory input model to acquire the data with the given default data as a user option.
 Stringable demandObject(String prompt, StringableFilter filter)
          Returns a Stringable object created by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 Stringable demandObject(String prompt, String data, StringableFilter filter)
          Returns a Stringable object created by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 Stringable demandObject(String prompt, String data, Stringable obj, StringableFilter filter)
          Returns the Stringable object obtained from the given Stringable object by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 short demandShort(String prompt)
          Demands a short value from the console, by using the mandatory input model to acquire the data.
 short demandShort(String prompt, short value)
          Demands a short value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 short demandShort(String prompt, short value, StringableFilter filter)
          Demands a short value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 short demandShort(String prompt, StringableFilter filter)
          Demands a short value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 String demandString(String prompt)
          Demands a String value from the console, by using the mandatory input model to acquire the data.
 String demandString(String prompt, String value)
          Demands a String value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.
 String demandString(String prompt, StringableFilter filter)
          Demands a String value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.
 String demandString(String prompt, String value, StringableFilter filter)
          Demands a String value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.
 Class getDataType()
          Returns the Stringable class of object produced on demand by this input stream.
 boolean reading(String prompt, Stringable obj)
          Sets the state of the given Stringable object by using a variation of the optional input model to acquire the data.
 boolean reading(String prompt, Stringable obj, StringableFilter filter)
          Sets the state of the given Stringable object by using a variation of the optional input model to acquire the data with the given input filter to constrain the result.
 void request(String prompt, Stringable obj)
          Sets the state of the given Stringable object by using the optional input model to acquire the data.
 void request(String prompt, Stringable obj, StringableFilter filter)
          Sets the state of the given Stringable object by using the optional input model to acquire the data with the given input filter to constrain the result.
 BigDecimal requestBigDecimal(String prompt)
          Requests a BigDecimal value from the console, by using the optional input model to acquire the data.
 BigDecimal requestBigDecimal(String prompt, StringableFilter filter)
          Requests a BigDecimal value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 BigInteger requestBigInteger(String prompt)
          Requests a BigInteger value from the console, by using the optional input model to acquire the data.
 BigInteger requestBigInteger(String prompt, StringableFilter filter)
          Requests a BigInteger value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 boolean requestBoolean(String prompt)
          Requests a boolean value from the console, by using the optional input model to acquire the data.
 boolean requestBoolean(String prompt, StringableFilter filter)
          Requests a boolean value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 byte requestByte(String prompt)
          Requests a byte value from the console, by using the optional input model to acquire the data.
 byte requestByte(String prompt, StringableFilter filter)
          Requests a byte value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 char requestChar(String prompt)
          Requests a char value from the console, by using the optional input model to acquire the data.
 char requestChar(String prompt, StringableFilter filter)
          Requests a char value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 Color requestColor(String prompt)
          Requests a Color value from the console, by using the optional input model to acquire the data.
 Color requestColor(String prompt, StringableFilter filter)
          Requests a Color value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 double requestDouble(String prompt)
          Requests a double value from the console, by using the optional input model to acquire the data.
 double requestDouble(String prompt, StringableFilter filter)
          Requests a double value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 float requestFloat(String prompt)
          Requests a float value from the console, by using the optional input model to acquire the data.
 float requestFloat(String prompt, StringableFilter filter)
          Requests a float value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 int requestInt(String prompt)
          Requests a int value from the console, by using the optional input model to acquire the data.
 int requestInt(String prompt, StringableFilter filter)
          Requests a int value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 long requestLong(String prompt)
          Requests a long value from the console, by using the optional input model to acquire the data.
 long requestLong(String prompt, StringableFilter filter)
          Requests a long value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 Stringable requestObject(Class dataType, String prompt, StringableFilter filter)
          Temporarily sets the data type for this stream to the given data type; creates a Stringable object by using the optional input model to acquire the data with the given input filter to constrain the result; restores the data type for this stream to its original setting; finally returns the object created.
 Stringable requestObject(String prompt)
          Returns the Stringable object obtained by using the optional input model to acquire the data.
 Stringable requestObject(String prompt, StringableFilter filter)
          Returns the Stringable object obtained by using the optional input model to acquire the data with the given input filter to constrain the result.
 Stringable requestObject(String prompt, Stringable obj, StringableFilter filter)
          Returns the Stringable object obtained from the given Stringable object by using the optional input model to acquire the data with the given input filter to constrain the result.
 short requestShort(String prompt)
          Requests a short value from the console, by using the optional input model to acquire the data.
 short requestShort(String prompt, StringableFilter filter)
          Requests a short value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 String requestString(String prompt)
          Requests a String value from the console, by using the optional input model to acquire the data.
 String requestString(String prompt, StringableFilter filter)
          Requests a String value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.
 void setDataType(Class c)
          Sets the class of object produced on demand by this input stream to the given Stringable class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected StringableFactory factory
Factory used to construct Stringable objects from input stream data.

Constructor Detail

ConsoleGateway.ConsoleInputStream

public ConsoleGateway.ConsoleInputStream()
Method Detail

setDataType

public void setDataType(Class c)

Sets the class of object produced on demand by this input stream to the given Stringable class.

If the given class is not Stringable, then an exception of type Error will be thrown.

Parameters:
c - the desired Stringable class of object
See Also:
getDataType()

getDataType

public Class getDataType()
Returns the Stringable class of object produced on demand by this input stream.

See Also:
setDataType(Class)

demandObject

public Stringable demandObject(String prompt,
                               String data,
                               Stringable obj,
                               StringableFilter filter)

Returns the Stringable object obtained from the given Stringable object by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given Stringable object is null, then a default instance of the current data type will be used to construct the initial object.

If the user provides no input data and the default data is not null, then the default data is used for input.

If the given input filter is null, no input filtering is performed.

If the given input filter is not null, then the object returned may be distinct from the object provided depending on how the filter process operates.

This method is the base method that all other demand methods directly or indirectly call.

Parameters:
prompt - the prompt String to display
data - the default data for the object
obj - the object whose state is to be set
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandObject(String), demandObject(String, StringableFilter), demandObject(String, String), demandObject(String, String, StringableFilter), demandObject(Class, String, String, StringableFilter), demand(String, Stringable), demand(String, Stringable, StringableFilter), demand(String, String, Stringable), demand(String, String, Stringable, StringableFilter)

demandObject

public Stringable demandObject(String prompt)

Returns a Stringable object created by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandObject(String, String, Stringable, StringableFilter), demandObject(String, StringableFilter), demandObject(String, String), demandObject(String, String, StringableFilter), demandObject(Class, String, String, StringableFilter), demand(String, Stringable), demand(String, Stringable, StringableFilter), demand(String, String, Stringable), demand(String, String, Stringable, StringableFilter)

demandObject

public Stringable demandObject(String prompt,
                               StringableFilter filter)

Returns a Stringable object created by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandObject(String, String, Stringable, StringableFilter), demandObject(String), demandObject(String, String), demandObject(String, String, StringableFilter), demandObject(Class, String, String, StringableFilter), demand(String, Stringable), demand(String, Stringable, StringableFilter), demand(String, String, Stringable), demand(String, String, Stringable, StringableFilter)

demandObject

public Stringable demandObject(String prompt,
                               String data)

Returns a Stringable object created by using the mandatory input model to acquire the data with the given default data as a user option.

If the user provides no input data and the default data is not null, then the default data is used for input.

Parameters:
prompt - the prompt String to display
data - the default data for the object
Since:
2.1
See Also:
demandObject(String, String, Stringable, StringableFilter), demandObject(String), demandObject(String, StringableFilter), demandObject(String, String, StringableFilter), demandObject(Class, String, String, StringableFilter), demand(String, Stringable), demand(String, Stringable, StringableFilter), demand(String, String, Stringable), demand(String, String, Stringable, StringableFilter)

demandObject

public Stringable demandObject(String prompt,
                               String data,
                               StringableFilter filter)

Returns a Stringable object created by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the user provides no input data and the default data is not null, then the default data is used for input.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
data - the default data for the object
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandObject(String, String, Stringable, StringableFilter), demandObject(String), demandObject(String, StringableFilter), demandObject(String, String), demandObject(Class, String, String, StringableFilter), demand(String, Stringable), demand(String, Stringable, StringableFilter), demand(String, String, Stringable), demand(String, String, Stringable, StringableFilter)

demandObject

public Stringable demandObject(Class dataType,
                               String prompt,
                               String data,
                               StringableFilter filter)

Temporarily sets the data type for this stream to the given data type; creates a Stringable object by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result; restores the data type for this stream to its original setting; finally returns the object created.

If the user provides no input data and the default data is not null, then the default data is used for input.

If the given input filter is null, no input filtering is performed.

Parameters:
dataType - the Stringable data type of the object
prompt - the prompt String to display
data - the default data for the object
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandObject(String, String, Stringable, StringableFilter), demandObject(String), demandObject(String, StringableFilter), demandObject(String, String), demandObject(String, String, StringableFilter), demand(String, Stringable), demand(String, Stringable, StringableFilter), demand(String, String, Stringable), demand(String, String, Stringable, StringableFilter)

demand

public void demand(String prompt,
                   Stringable obj)

Sets the state of the given Stringable object by using the mandatory input model to acquire the data.

If the given Stringable object is null, then throws NullPointerException.

Parameters:
prompt - the prompt String to display
obj - the object whose state is to be set
Throws:
NullPointerException - if the given object is null
Since:
2.1
See Also:
demandObject(String, String, Stringable, StringableFilter), demandObject(String), demandObject(String, StringableFilter), demandObject(String, String), demandObject(String, String, StringableFilter), demandObject(Class, String, String, StringableFilter), demand(String, Stringable, StringableFilter), demand(String, String, Stringable), demand(String, String, Stringable, StringableFilter)

demand

public void demand(String prompt,
                   Stringable obj,
                   StringableFilter filter)

Sets the state of the given Stringable object by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given Stringable object is null, then throws NullPointerException.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
obj - the object whose state is to be set
filter - the filter to use for the input operation
Throws:
NullPointerException - if the given object is null
Since:
2.1
See Also:
demandObject(String, String, Stringable, StringableFilter), demandObject(String), demandObject(String, StringableFilter), demandObject(String, String), demandObject(String, String, StringableFilter), demandObject(Class, String, String, StringableFilter), demand(String, Stringable), demand(String, String, Stringable), demand(String, String, Stringable, StringableFilter)

demand

public void demand(String prompt,
                   String data,
                   Stringable obj)

Sets the state of the given Stringable object by using the mandatory input model to acquire the data with the given default data as a user option.

If the given Stringable object is null, then throws NullPointerException.

If the user provides no input data and the default data is not null, then the default data is used for input.

Parameters:
prompt - the prompt String to display
data - the default data for the object
obj - the object whose state is to be set
Throws:
NullPointerException - if the given object is null
Since:
2.1
See Also:
demandObject(String, String, Stringable, StringableFilter), demandObject(String), demandObject(String, StringableFilter), demandObject(String, String), demandObject(String, String, StringableFilter), demandObject(Class, String, String, StringableFilter), demand(String, Stringable), demand(String, Stringable, StringableFilter), demand(String, String, Stringable, StringableFilter)

demand

public void demand(String prompt,
                   String data,
                   Stringable obj,
                   StringableFilter filter)

Sets the state of the given Stringable object by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given Stringable object is null, then throws NullPointerException.

If the user provides no input data and the default data is not null, then the default data is used for input.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
data - the default data for the object
obj - the object whose state is to be set
filter - the filter to use for the input operation
Throws:
NullPointerException - if the given object is null
Since:
2.1
See Also:
demandObject(String, String, Stringable, StringableFilter), demandObject(String), demandObject(String, StringableFilter), demandObject(String, String), demandObject(String, String, StringableFilter), demandObject(Class, String, String, StringableFilter), demand(String, Stringable), demand(String, Stringable, StringableFilter), demand(String, String, Stringable)

requestObject

public Stringable requestObject(String prompt,
                                Stringable obj,
                                StringableFilter filter)
                         throws CancelledException

Returns the Stringable object obtained from the given Stringable object by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given Stringable object is null, then a default instance of the current data type will be used to construct the initial object.

The optional model is implemented for the console window as follows:

If the user provides no input data, that is, the user presses return on an empty line, then the IO operation is assumed to be cancelled and a CancelledException will be thrown.

In particular, with the optional model, it is impossible to input an empty string as the object initialization data.

If the given input filter is null, no input filtering is performed.

If the given input filter is not null, then the object returned may be distinct from the object provided depending on how the filter process operates.

This method is the base method that all other request methods directly or indirectly call.

Parameters:
prompt - the prompt String to display
obj - the object whose state is to be set
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestObject(String), requestObject(String, StringableFilter), requestObject(Class, String, StringableFilter), request(String, Stringable), request(String, Stringable, StringableFilter)

requestObject

public Stringable requestObject(String prompt)
                         throws CancelledException

Returns the Stringable object obtained by using the optional input model to acquire the data.

The optional model is implemented for the console window as follows:

If the user provides no input data, that is, the user presses return on an empty line, then the IO operation is assumed to be cancelled and a CancelledException will be thrown.

In particular, with the optional model, it is impossible to input an empty string as the object initialization data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestObject(String, Stringable, StringableFilter), requestObject(String, StringableFilter), requestObject(Class, String, StringableFilter), request(String, Stringable), request(String, Stringable, StringableFilter)

requestObject

public Stringable requestObject(String prompt,
                                StringableFilter filter)
                         throws CancelledException

Returns the Stringable object obtained by using the optional input model to acquire the data with the given input filter to constrain the result.

The optional model is implemented for the console window as follows:

If the user provides no input data, that is, the user presses return on an empty line, then the IO operation is assumed to be cancelled and a CancelledException will be thrown.

In particular, with the optional model, it is impossible to input an empty string as the object initialization data.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestObject(String, Stringable, StringableFilter), requestObject(String), requestObject(Class, String, StringableFilter), request(String, Stringable), request(String, Stringable, StringableFilter)

requestObject

public Stringable requestObject(Class dataType,
                                String prompt,
                                StringableFilter filter)
                         throws CancelledException

Temporarily sets the data type for this stream to the given data type; creates a Stringable object by using the optional input model to acquire the data with the given input filter to constrain the result; restores the data type for this stream to its original setting; finally returns the object created.

The optional model is implemented for the console window as follows:

If the user provides no input data, that is, the user presses return on an empty line, then the IO operation is assumed to be cancelled and a CancelledException will be thrown.

In particular, with the optional model, it is impossible to input an empty string as the object initialization data.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestObject(String, Stringable, StringableFilter), requestObject(String), requestObject(String, StringableFilter), request(String, Stringable), request(String, Stringable, StringableFilter)

request

public void request(String prompt,
                    Stringable obj)
             throws CancelledException

Sets the state of the given Stringable object by using the optional input model to acquire the data.

If the given Stringable object is null, then throws NullPointerException.

The optional model is implemented for the console window as follows:

If the user provides no input data, that is, the user presses return on an empty line, then the IO operation is assumed to be cancelled and a CancelledException will be thrown.

In particular, with the optional model, it is impossible to input an empty string as the object initialization data.

Parameters:
prompt - the prompt String to display
obj - the object whose state is to be set
Throws:
CancelledException
NullPointerException - if the given object is null
Since:
2.3.1
See Also:
requestObject(String, Stringable, StringableFilter), requestObject(String), requestObject(String, StringableFilter), requestObject(Class, String, StringableFilter), request(String, Stringable, StringableFilter)

request

public void request(String prompt,
                    Stringable obj,
                    StringableFilter filter)
             throws CancelledException

Sets the state of the given Stringable object by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given Stringable object is null, then throws NullPointerException.

The optional model is implemented for the console window as follows:

If the user provides no input data, that is, the user presses return on an empty line, then the IO operation is assumed to be cancelled and a CancelledException will be thrown.

In particular, with the optional model, it is impossible to input an empty string as the object initialization data.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
obj - the object whose state is to be set
filter - the filter to use for the input operation
Throws:
CancelledException
NullPointerException - if the given object is null
Since:
2.3.1
See Also:
requestObject(String, Stringable, StringableFilter), requestObject(String), requestObject(String, StringableFilter), requestObject(Class, String, StringableFilter), request(String, Stringable)

reading

public boolean reading(String prompt,
                       Stringable obj)

Sets the state of the given Stringable object by using a variation of the optional input model to acquire the data.

If the given Stringable object is null, then throws NullPointerException.

The variant of the optional model is implemented for the console window as follows:

If the user provides valid input data, then the method returns true.

If the user provides no input data, that is, the user presses return on an empty line, then the IO operation is assumed to be cancelled and the method returns false.

In particular, with the optional model, it is impossible to input an empty string as the object initialization data.

Parameters:
prompt - the prompt String to display
obj - the object whose state is to be set
Returns:
true if the state is set or false if no input is provided.
Throws:
NullPointerException - if the given object is null
Since:
2.1

reading

public boolean reading(String prompt,
                       Stringable obj,
                       StringableFilter filter)

Sets the state of the given Stringable object by using a variation of the optional input model to acquire the data with the given input filter to constrain the result.

If the given Stringable object is null, then throws NullPointerException.

The variant of the optional model is implemented for the console window as follows:

If the user provides valid input data, then the method returns true.

If the user provides no input data, that is, the user presses return on an empty line, then the IO operation is assumed to be cancelled and the method returns false.

In particular, with the optional model, it is impossible to input an empty string as the object initialization data.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
obj - the object whose state is to be set
filter - the filter to use for the input operation
Returns:
true if the state is set or false if no input is provided.
Throws:
NullPointerException - if the given object is null
Since:
2.1

demandByte

public byte demandByte(String prompt)

Demands a byte value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandByte(String, StringableFilter), demandByte(String, byte), demandByte(String, byte, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandByte

public byte demandByte(String prompt,
                       StringableFilter filter)

Demands a byte value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandByte(String), demandByte(String, byte), demandByte(String, byte, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandByte

public byte demandByte(String prompt,
                       byte value)

Demands a byte value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandByte(String), demandByte(String, StringableFilter), demandByte(String, byte, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandByte

public byte demandByte(String prompt,
                       byte value,
                       StringableFilter filter)

Demands a byte value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandByte(String), demandByte(String, StringableFilter), demandByte(String, byte), demandObject(Class, String, String, StringableFilter)

requestByte

public byte requestByte(String prompt)
                 throws CancelledException

Requests a byte value from the console, by using the optional input model to acquire the data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestByte(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestByte

public byte requestByte(String prompt,
                        StringableFilter filter)
                 throws CancelledException

Requests a byte value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestByte(String), requestObject(Class, String, StringableFilter)

demandShort

public short demandShort(String prompt)

Demands a short value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandShort(String, StringableFilter), demandShort(String, short), demandShort(String, short, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandShort

public short demandShort(String prompt,
                         StringableFilter filter)

Demands a short value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandShort(String), demandShort(String, short), demandShort(String, short, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandShort

public short demandShort(String prompt,
                         short value)

Demands a short value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandShort(String), demandShort(String, StringableFilter), demandShort(String, short, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandShort

public short demandShort(String prompt,
                         short value,
                         StringableFilter filter)

Demands a short value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandShort(String), demandShort(String, StringableFilter), demandShort(String, short), demandObject(Class, String, String, StringableFilter)

requestShort

public short requestShort(String prompt)
                   throws CancelledException

Requests a short value from the console, by using the optional input model to acquire the data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestShort(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestShort

public short requestShort(String prompt,
                          StringableFilter filter)
                   throws CancelledException

Requests a short value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestShort(String), requestObject(Class, String, StringableFilter)

demandInt

public int demandInt(String prompt)

Demands a int value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandInt(String, StringableFilter), demandInt(String, int), demandInt(String, int, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandInt

public int demandInt(String prompt,
                     StringableFilter filter)

Demands a int value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandInt(String), demandInt(String, int), demandInt(String, int, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandInt

public int demandInt(String prompt,
                     int value)

Demands a int value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandInt(String), demandInt(String, StringableFilter), demandInt(String, int, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandInt

public int demandInt(String prompt,
                     int value,
                     StringableFilter filter)

Demands a int value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandInt(String), demandInt(String, StringableFilter), demandInt(String, int), demandObject(Class, String, String, StringableFilter)

requestInt

public int requestInt(String prompt)
               throws CancelledException

Requests a int value from the console, by using the optional input model to acquire the data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestInt(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestInt

public int requestInt(String prompt,
                      StringableFilter filter)
               throws CancelledException

Requests a int value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestInt(String), requestObject(Class, String, StringableFilter)

demandLong

public long demandLong(String prompt)

Demands a long value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandLong(String, StringableFilter), demandLong(String, long), demandLong(String, long, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandLong

public long demandLong(String prompt,
                       StringableFilter filter)

Demands a long value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandLong(String), demandLong(String, long), demandLong(String, long, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandLong

public long demandLong(String prompt,
                       long value)

Demands a long value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandLong(String), demandLong(String, StringableFilter), demandLong(String, long, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandLong

public long demandLong(String prompt,
                       long value,
                       StringableFilter filter)

Demands a long value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandLong(String), demandLong(String, StringableFilter), demandLong(String, long), demandObject(Class, String, String, StringableFilter)

requestLong

public long requestLong(String prompt)
                 throws CancelledException

Requests a long value from the console, by using the optional input model to acquire the data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestLong(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestLong

public long requestLong(String prompt,
                        StringableFilter filter)
                 throws CancelledException

Requests a long value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestLong(String), requestObject(Class, String, StringableFilter)

demandFloat

public float demandFloat(String prompt)

Demands a float value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandFloat(String, StringableFilter), demandFloat(String, float), demandFloat(String, float, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandFloat

public float demandFloat(String prompt,
                         StringableFilter filter)

Demands a float value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandFloat(String), demandFloat(String, float), demandFloat(String, float, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandFloat

public float demandFloat(String prompt,
                         float value)

Demands a float value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandFloat(String), demandFloat(String, StringableFilter), demandFloat(String, float, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandFloat

public float demandFloat(String prompt,
                         float value,
                         StringableFilter filter)

Demands a float value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandFloat(String), demandFloat(String, StringableFilter), demandFloat(String, float), demandObject(Class, String, String, StringableFilter)

requestFloat

public float requestFloat(String prompt)
                   throws CancelledException

Requests a float value from the console, by using the optional input model to acquire the data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestFloat(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestFloat

public float requestFloat(String prompt,
                          StringableFilter filter)
                   throws CancelledException

Requests a float value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestFloat(String), requestObject(Class, String, StringableFilter)

demandDouble

public double demandDouble(String prompt)

Demands a double value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandDouble(String, StringableFilter), demandDouble(String, double), demandDouble(String, double, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandDouble

public double demandDouble(String prompt,
                           StringableFilter filter)

Demands a double value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandDouble(String), demandDouble(String, double), demandDouble(String, double, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandDouble

public double demandDouble(String prompt,
                           double value)

Demands a double value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandDouble(String), demandDouble(String, StringableFilter), demandDouble(String, double, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandDouble

public double demandDouble(String prompt,
                           double value,
                           StringableFilter filter)

Demands a double value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandDouble(String), demandDouble(String, StringableFilter), demandDouble(String, double), demandObject(Class, String, String, StringableFilter)

requestDouble

public double requestDouble(String prompt)
                     throws CancelledException

Requests a double value from the console, by using the optional input model to acquire the data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestDouble(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestDouble

public double requestDouble(String prompt,
                            StringableFilter filter)
                     throws CancelledException

Requests a double value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestDouble(String), requestObject(Class, String, StringableFilter)

demandChar

public char demandChar(String prompt)

Demands a char value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandChar(String, StringableFilter), demandChar(String, char), demandChar(String, char, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandChar

public char demandChar(String prompt,
                       StringableFilter filter)

Demands a char value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandChar(String), demandChar(String, char), demandChar(String, char, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandChar

public char demandChar(String prompt,
                       char value)

Demands a char value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandChar(String), demandChar(String, StringableFilter), demandChar(String, char, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandChar

public char demandChar(String prompt,
                       char value,
                       StringableFilter filter)

Demands a char value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandChar(String), demandChar(String, StringableFilter), demandChar(String, char), demandObject(Class, String, String, StringableFilter)

requestChar

public char requestChar(String prompt)
                 throws CancelledException

Requests a char value from the console, by using the optional input model to acquire the data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestChar(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestChar

public char requestChar(String prompt,
                        StringableFilter filter)
                 throws CancelledException

Requests a char value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestChar(String), requestObject(Class, String, StringableFilter)

demandBoolean

public boolean demandBoolean(String prompt)

Demands a boolean value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandBoolean(String, StringableFilter), demandBoolean(String, boolean), demandBoolean(String, boolean, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandBoolean

public boolean demandBoolean(String prompt,
                             StringableFilter filter)

Demands a boolean value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandBoolean(String), demandBoolean(String, boolean), demandBoolean(String, boolean, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandBoolean

public boolean demandBoolean(String prompt,
                             boolean value)

Demands a boolean value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandBoolean(String), demandBoolean(String, StringableFilter), demandBoolean(String, boolean, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandBoolean

public boolean demandBoolean(String prompt,
                             boolean value,
                             StringableFilter filter)

Demands a boolean value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandBoolean(String), demandBoolean(String, StringableFilter), demandBoolean(String, boolean), demandObject(Class, String, String, StringableFilter)

requestBoolean

public boolean requestBoolean(String prompt)
                       throws CancelledException

Requests a boolean value from the console, by using the optional input model to acquire the data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestBoolean(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestBoolean

public boolean requestBoolean(String prompt,
                              StringableFilter filter)
                       throws CancelledException

Requests a boolean value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestBoolean(String), requestObject(Class, String, StringableFilter)

demandString

public String demandString(String prompt)

Demands a String value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandString(String, StringableFilter), demandString(String, String), demandString(String, String, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandString

public String demandString(String prompt,
                           StringableFilter filter)

Demands a String value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandString(String), demandString(String, String), demandString(String, String, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandString

public String demandString(String prompt,
                           String value)

Demands a String value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandString(String), demandString(String, StringableFilter), demandString(String, String, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandString

public String demandString(String prompt,
                           String value,
                           StringableFilter filter)

Demands a String value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandString(String), demandString(String, StringableFilter), demandString(String, String), demandObject(Class, String, String, StringableFilter)

requestString

public String requestString(String prompt)
                     throws CancelledException

Requests a String value from the console, by using the optional input model to acquire the data.

With the optional model, it is impossible to input an empty string since this will trigger a CancelledException.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestString(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestString

public String requestString(String prompt,
                            StringableFilter filter)
                     throws CancelledException

Requests a String value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

With the optional model, it is impossible to input an empty string since this will trigger a CancelledException.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestString(String), requestObject(Class, String, StringableFilter)

demandBigInteger

public BigInteger demandBigInteger(String prompt)

Demands a BigInteger value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandBigInteger(String, StringableFilter), demandBigInteger(String, BigInteger), demandBigInteger(String, BigInteger, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandBigInteger

public BigInteger demandBigInteger(String prompt,
                                   StringableFilter filter)

Demands a BigInteger value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandBigInteger(String), demandBigInteger(String, BigInteger), demandBigInteger(String, BigInteger, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandBigInteger

public BigInteger demandBigInteger(String prompt,
                                   BigInteger value)

Demands a BigInteger value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandBigInteger(String), demandBigInteger(String, StringableFilter), demandBigInteger(String, BigInteger, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandBigInteger

public BigInteger demandBigInteger(String prompt,
                                   BigInteger value,
                                   StringableFilter filter)

Demands a BigInteger value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandBigInteger(String), demandBigInteger(String, StringableFilter), demandBigInteger(String, BigInteger), demandObject(Class, String, String, StringableFilter)

requestBigInteger

public BigInteger requestBigInteger(String prompt)
                             throws CancelledException

Requests a BigInteger value from the console, by using the optional input model to acquire the data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestBigInteger(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestBigInteger

public BigInteger requestBigInteger(String prompt,
                                    StringableFilter filter)
                             throws CancelledException

Requests a BigInteger value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestBigInteger(String), requestObject(Class, String, StringableFilter)

demandBigDecimal

public BigDecimal demandBigDecimal(String prompt)

Demands a BigDecimal value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandBigDecimal(String, StringableFilter), demandBigDecimal(String, BigDecimal), demandBigDecimal(String, BigDecimal, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandBigDecimal

public BigDecimal demandBigDecimal(String prompt,
                                   StringableFilter filter)

Demands a BigDecimal value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandBigDecimal(String), demandBigDecimal(String, BigDecimal), demandBigDecimal(String, BigDecimal, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandBigDecimal

public BigDecimal demandBigDecimal(String prompt,
                                   BigDecimal value)

Demands a BigDecimal value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandBigDecimal(String), demandBigDecimal(String, StringableFilter), demandBigDecimal(String, BigDecimal, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandBigDecimal

public BigDecimal demandBigDecimal(String prompt,
                                   BigDecimal value,
                                   StringableFilter filter)

Demands a BigDecimal value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandBigDecimal(String), demandBigDecimal(String, StringableFilter), demandBigDecimal(String, BigDecimal), demandObject(Class, String, String, StringableFilter)

requestBigDecimal

public BigDecimal requestBigDecimal(String prompt)
                             throws CancelledException

Requests a BigDecimal value from the console, by using the optional input model to acquire the data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestBigDecimal(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestBigDecimal

public BigDecimal requestBigDecimal(String prompt,
                                    StringableFilter filter)
                             throws CancelledException

Requests a BigDecimal value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestBigDecimal(String), requestObject(Class, String, StringableFilter)

demandColor

public Color demandColor(String prompt)

Demands a Color value from the console, by using the mandatory input model to acquire the data.

Parameters:
prompt - the prompt String to display
Since:
2.1
See Also:
demandColor(String, StringableFilter), demandColor(String, Color), demandColor(String, Color, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandColor

public Color demandColor(String prompt,
                         StringableFilter filter)

Demands a Color value from the console, by using the mandatory input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Since:
2.3.1
See Also:
demandColor(String), demandColor(String, Color), demandColor(String, Color, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandColor

public Color demandColor(String prompt,
                         Color value)

Demands a Color value from the console, by using the mandatory input model to acquire the data with the given default data as a user option.

Parameters:
prompt - the prompt String to display
value - the desired default value
Since:
2.1
See Also:
demandColor(String), demandColor(String, StringableFilter), demandColor(String, Color, StringableFilter), demandObject(Class, String, String, StringableFilter)

demandColor

public Color demandColor(String prompt,
                         Color value,
                         StringableFilter filter)

Demands a Color value from the console, by using the mandatory input model to acquire the data, with the given default data as a user option, and with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
value - the desired default value
filter - the filter to use for the input operation
Since:
2.1
See Also:
demandColor(String), demandColor(String, StringableFilter), demandColor(String, Color), demandObject(Class, String, String, StringableFilter)

requestColor

public Color requestColor(String prompt)
                   throws CancelledException

Requests a Color value from the console, by using the optional input model to acquire the data.

Parameters:
prompt - the prompt String to display
Throws:
CancelledException
Since:
2.3.1
See Also:
requestColor(String, StringableFilter), requestObject(Class, String, StringableFilter)

requestColor

public Color requestColor(String prompt,
                          StringableFilter filter)
                   throws CancelledException

Requests a Color value from the console, by using the optional input model to acquire the data with the given input filter to constrain the result.

If the given input filter is null, no input filtering is performed.

Parameters:
prompt - the prompt String to display
filter - the filter to use for the input operation
Throws:
CancelledException
Since:
2.3.1
See Also:
requestColor(String), requestObject(Class, String, StringableFilter)