
Package ca.uhn.fhir.util
Class ObjectUtil
java.lang.Object
ca.uhn.fhir.util.ObjectUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Optional<T> castIfInstanceof(Object theObject, Class<T> theClass) Cast the object to the type using Optional.static booleanDeprecated.Just use Objects.equals() instead;static <T> TrequireNonNull(T obj, String message) static voidrequireNotEmpty(String str, String message)
-
Method Details
-
equals
Deprecated.Just use Objects.equals() instead; -
requireNonNull
-
requireNotEmpty
-
castIfInstanceof
Cast the object to the type using Optional. Useful for streaming with flatMap.- Parameters:
theObject- any objecttheClass- the class to check instanceof- Returns:
- Optional present if theObject is of type theClass
-