Package org.strassburger.tui4j.input
Class DateInput
A class for handling date input
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the current date formatread()Read the input valuesetDateFormat(String dateFormat) Set the date format for input validationsetInline(boolean inline) Methods inherited from class org.strassburger.tui4j.input.Input
addValidationRule, addValidationRules, getCursor, getErrorMessage, getLabel, getPrinter, getScanner, isRetryOnInvalid, setCursor, setErrorMessage, setErrorMessage, setLabel, setLabel, setPrinter, setRetryOnInvalid, setScanner, validate
-
Constructor Details
-
DateInput
public DateInput()
-
-
Method Details
-
read
Description copied from class:InputRead the input value- Specified by:
readin classInput<Date,DateInput> - Returns:
- the input value
- Throws:
InputValidationException- if the input is invalid and retryOnInvalid is false
-
setDateFormat
Set the date format for input validation- Parameters:
dateFormat- the date format to use (e.g., "dd/MM/yyyy")- Returns:
- the DateInput object
-
getDateFormat
Get the current date format- Returns:
- the date format string
-
setInline
-