Remove passage and get broken links with streams
Is your feature related to a problem? Please describe.
Need better validation for links and customizability for the passages map.
Describe the solution you'd like.
Implement two new methods for the Story class.
-
removePassage
: Removes a passage from the passages map. A passage can not be removed if it has other links connected to it. -
getBrokenLinks
: Retrieves a list of Links which points to a passage which is not in the passages map. Checks links that each passage in the passages map has.
These methods have to use java streams.