Class DFWrappedValues


  • public final class DFWrappedValues
    extends java.lang.Object
    Utility methods for wrapped values.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Object getUnwrappedValue​(java.lang.Object value)
      If given value is instance of DFWrappedValue the method tries to unwrap the value and returns the result.
      static java.lang.Object getValue​(boolean unwrap, java.lang.Object value)
      If unwrap is true and given value is instance of DFWrappedValue the method tries to unwrap the value and returns the result.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getValue

        public static java.lang.Object getValue​(boolean unwrap,
                                                java.lang.Object value)
        If unwrap is true and given value is instance of DFWrappedValue the method tries to unwrap the value and returns the result. If unwrapping fails, problem is logged and null is returned. If the value is already unwrapped valued it is returned directly.
        Parameters:
        unwrap - whether to unwrap possibly wrapped value
        value - possibly wrapped value
        Returns:
        possibly unwrapped result
      • getUnwrappedValue

        public static java.lang.Object getUnwrappedValue​(java.lang.Object value)
        If given value is instance of DFWrappedValue the method tries to unwrap the value and returns the result. If unwrapping fails, problem is logged and null is returned. If the value is already unwrapped valued it is returned directly.
        Parameters:
        value - possibly wrapped value
        Returns:
        possibly unwrapped result