I.e. instead of:
if (value != null) { doSomething(value); }do:
OptionalmaybeValue = Optional.ofNullable(value); if (maybeValue.isPresent()) { doSomething(maybeValue.get()); }
if (value != null) { doSomething(value); }do:
OptionalmaybeValue = Optional.ofNullable(value); if (maybeValue.isPresent()) { doSomething(maybeValue.get()); }
JAXB provides support for the XML schema specification, but handles only a subset of it; XMLBeans supports all of it. Also, by storing the data in memory as XML, XMLBeans is able to reduce the overhead of marshalling and demarshalling.http://xmlbeans.apache.org/docs/2.0.0/guide/conGettingStartedwithXMLBeans.html