@ Nullable public < T > T getUnique ( final URI property , final Class < T > valueClass , @ Nullable final T defaultValue ) { try { final T value = getUnique ( property , valueClass ) ; return value == null ? defaultValue : value ; } catch ( final IllegalStateException ex ) { return defaultValue ; } catch ( final IllegalArgumentException ex ) { return defaultValue ; } }
Returns the unique value of the property converted to an instance of a certain class or the default value supplied in case of failure .