Class Utils


  • public class Utils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Utils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T checkNotNull​(T reference, java.lang.String errorMessage)  
      static java.lang.String emptyToNull​(java.lang.String str)  
      static java.nio.file.Path findReadmeFile​(java.nio.file.Path file)  
      static <T> T firstNonNull​(T f, T s)  
      static java.io.InputStream getResource​(java.lang.String filename)  
      static boolean isNullOrEmpty​(java.lang.String str)  
      static java.lang.String nullToEmpty​(java.lang.String nullableReference)  
      static java.util.Set<Violation> setReporter​(java.util.Set<Violation> violations, java.lang.String reporter)  
      static java.lang.String toString​(java.io.InputStream inputStream)  
      static java.lang.String toString​(java.net.URL resource)  
      static void updateReadmeWithReporters()  
      • Methods inherited from class java.lang.Object

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

      • Utils

        public Utils()
    • Method Detail

      • checkNotNull

        public static <T> T checkNotNull​(T reference,
                                         java.lang.String errorMessage)
      • emptyToNull

        public static java.lang.String emptyToNull​(java.lang.String str)
      • nullToEmpty

        public static java.lang.String nullToEmpty​(java.lang.String nullableReference)
      • firstNonNull

        public static <T> T firstNonNull​(T f,
                                         T s)
      • getResource

        public static java.io.InputStream getResource​(java.lang.String filename)
      • isNullOrEmpty

        public static boolean isNullOrEmpty​(java.lang.String str)
      • toString

        public static java.lang.String toString​(java.io.InputStream inputStream)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

        public static java.lang.String toString​(java.net.URL resource)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • setReporter

        public static java.util.Set<Violation> setReporter​(java.util.Set<Violation> violations,
                                                           java.lang.String reporter)
      • updateReadmeWithReporters

        public static void updateReadmeWithReporters()
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • findReadmeFile

        public static java.nio.file.Path findReadmeFile​(java.nio.file.Path file)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException