Class Main

java.lang.Object
de.dhbw.contactdb.Main

public class Main extends Object
Main class
Since:
21.06.2021
Version:
1.0
Author:
florian kaiser
  • Field Details

  • Constructor Details

    • Main

      public Main()
  • Method Details

    • main

      public static void main(String[] args)
      Main function
      Parameters:
      args - String that contains program arguments
    • argument_error

      private static void argument_error()
      Prints error message
    • searchForPlace

      public static void searchForPlace(String search)
      Searches the HashMap places for a specific string
      Parameters:
      search - String that contains search value
    • searchForPerson

      public static void searchForPerson(String search)
      Searches the HashMap persons for a specific string
      Parameters:
      search - String that contains search value
    • getContactPersons

      public static List<Visit> getContactPersons(int id)
      Lists all persons that were at the same place at the same time as a specific person. Only if the place is indoor
      Parameters:
      id - Contains the id of a person
      Returns:
      List that contains visits
    • getVisitors

      public static List<Visit> getVisitors(String s)
      Lists all Persons that were at the same place (id) at the same time. If the place is indoor, the contact persons of each person is added to the result too.
      Parameters:
      s - contains program argument (id of place and date string, separated by comma)
      Returns:
      List that contains visits
    • getSearchString

      public static String getSearchString(String s)
      Extracts string from String. Exits program if string is empty, blank or not available
      Parameters:
      s - Contains program argument
      Returns:
      extracted string