Class Helpers

java.lang.Object
org.apache.pekko.util.Helpers

public class Helpers extends Object
  • Constructor Details

    • Helpers

      public Helpers()
  • Method Details

    • toRootLowerCase

      public static String toRootLowerCase(String s)
    • isWindows

      public static boolean isWindows()
    • makePattern

      public static Pattern makePattern(String s)
    • compareIdentityHash

      public static int compareIdentityHash(Object a, Object b)
    • identityHashComparator

      public static <T> Comparator<T> identityHashComparator(Comparator<T> comp)
      Create a comparator which will efficiently use System.identityHashCode, unless that happens to be the same for two non-equals objects, in which case the supplied &ldquo;real&rdquo; comparator is used; the comparator must be consistent with equals, otherwise it would not be an enhancement over the identityHashCode.
    • currentTimeMillisToUTCString

      public static String currentTimeMillisToUTCString(long timestamp)
      Converts a "currentTimeMillis"-obtained timestamp accordingly:
      
         "$hours%02d:$minutes%02d:$seconds%02d.$ms%03dUTC"
       

      Parameters:
      timestamp - a "currentTimeMillis"-obtained timestamp
      Returns:
      the formatted timestamp
    • timestamp

      public static String timestamp(long time)
    • base64chars

      public static final String base64chars()
    • base64

      public static String base64(long l, StringBuilder sb)
    • base64$default$2

      public static StringBuilder base64$default$2()
    • Requiring

      public static final <A> Helpers.Requiring<A> Requiring(A value)