Package de.dhbw.contactdb
Class Main
java.lang.Object
de.dhbw.contactdb.Main
Main class
- Since:
- 21.06.2021
- Version:
- 1.0
- Author:
- florian kaiser
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
Prints error messagegetContactPersons(int id)
Lists all persons that were at the same place at the same time as a specific person.static String
Extracts string from String.getVisitors(String s)
Lists all Persons that were at the same place (id) at the same time.static void
Main functionstatic void
searchForPerson(String search)
Searches the HashMap persons for a specific stringstatic void
searchForPlace(String search)
Searches the HashMap places for a specific string
-
Field Details
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
main
Main function- Parameters:
args
- String that contains program arguments
-
argument_error
private static void argument_error()Prints error message -
searchForPlace
Searches the HashMap places for a specific string- Parameters:
search
- String that contains search value
-
searchForPerson
Searches the HashMap persons for a specific string- Parameters:
search
- String that contains search value
-
getContactPersons
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
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
Extracts string from String. Exits program if string is empty, blank or not available- Parameters:
s
- Contains program argument- Returns:
- extracted string
-