Package src.handler

Class InputHandler

Object
InputHandler

public class InputHandler extends Object
Generic helper functions for handling inputs
Version:
1.0
Author:
Lee Juin
  • 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

      public static String 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