Class RessorUtils

  • public class RessorUtils
    extends java.lang.Object
    Utility methods here can be found in most popular libraries, but we duplicate them here in order to save on dependency tree size of Ressor
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Object defaultInstance​(java.lang.Class<?> type)  
      static <T> T firstNonNull​(T first, T last)  
      static <T> java.util.concurrent.Callable<T> safe​(java.util.concurrent.Callable<T> action, T defaultValue)  
      static void silentlyClose​( stream)  
      • Methods inherited from class java.lang.Object

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

      • RessorUtils

        public RessorUtils()
    • Method Detail

      • firstNonNull

        public static <T> T firstNonNull​(T first,
                                         T last)
      • defaultInstance

        public static java.lang.Object defaultInstance​(java.lang.Class<?> type)
      • silentlyClose

        public static void silentlyClose​( stream)
      • safe

        public static <T> java.util.concurrent.Callable<T> safe​(java.util.concurrent.Callable<T> action,
                                                                T defaultValue)