A Demonstration of how to use an Abstract Factory without need of a switch/if chain using method references and the Supplier class.
petfactory/PetTypes is where the magic happens. The child constructors are passed by method reference to the PetType enum and stored as a Supplier, which is then used to return a new instance of the subclass matching a String.
Shout out to the legend @git-leon