Package src.handler
Class InputHandler
Object
InputHandler
Generic helper functions for handling inputs
- Version:
- 1.0
- Author:
- Lee Juin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
Helper function to read a doublestatic int
Helper function to read an integerstatic String
Helper function to read a string
-
Constructor Details
-
InputHandler
public InputHandler()Constructor
-
-
Method Details
-
intHandler
public static int intHandler()Helper function to read an integer- Returns:
-1
if the input is invalid, otherwise returns the integer read
-
stringHandler
Helper function to read a string- Returns:
null
if the input is invalid, otherwise returns the string read
-
doubleHandler
public static double doubleHandler()Helper function to read a double- Returns:
-1
if the input is invalid, otherwise returns the double read
-