java doc and readme update

This commit is contained in:
schrom01 2022-10-30 09:37:27 +01:00
parent 3e586093ba
commit da7a31f512
2 changed files with 11 additions and 3 deletions

View File

@ -27,3 +27,6 @@ These branches are for bugfixes.
These branches are for javadoc and project documentation (such as the readme, class diagrams etc.).
## User Manual
- Search Plant List: if first Char is '#': only exact match in ID.

View File

@ -99,7 +99,14 @@ public class PlantListModel {
return plantList;
}
/**
*
* @param zone selected hardiness zone
* @param searchString the string to search plant List, set '#' as first char the search by id.
* @return List of plants found in Plant List which contain the search String in the name or description
* @throws HardinessZoneNotSetException If no {@link HardinessZone} was specified
* @throws IOException If the database cannot be accessed
*/
public List<Plant> getFilteredPlantListByString(HardinessZone zone, String searchString) throws HardinessZoneNotSetException, IOException {
if(searchString.charAt(0) == '#') {
try {
@ -111,6 +118,4 @@ public class PlantListModel {
return getFilteredPlantList(zone, plant -> plant.name().contains(searchString) || plant.description().contains(searchString));
}
}
}