is it possible to use twice ifPresent each one checking different return or bifurcate map
Context: I have chained objects generated by wsdl2java. There is an already created method that call the soap web services, receives the xml and unmarshalling it in cascaded objects. Desire: I want to get two different objects which lies in different hierarchy nodes. From mapping perspective they are hold "far" from one another but from business perspective they are a "couple". This is currently working: Optional.ofNullable(onderneming.getOndernemingOfVestiging()).map(OndernemingOfVestigingType::getCode) //same return .map(CodeOndernemingOfVestigingType::getValue) // different object return