Package org.apache.pekko.util
Class Helpers
java.lang.Object
org.apache.pekko.util.Helpers
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final classImplicit class providingrequiringmethods.static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringbase64(long l, StringBuilder sb) static StringBuilderstatic final Stringstatic intcompareIdentityHash(Object a, Object b) static StringcurrentTimeMillisToUTCString(long timestamp) Converts a "currentTimeMillis"-obtained timestamp accordingly:static <T> Comparator<T>identityHashComparator(Comparator<T> comp) Create a comparator which will efficiently useSystem.identityHashCode, unless that happens to be the same for two non-equals objects, in which case the supplied “real” comparator is used; the comparator must be consistent with equals, otherwise it would not be an enhancement over the identityHashCode.static booleanstatic Patternstatic final <A> Helpers.Requiring<A>Requiring(A value) static Stringtimestamp(long time) static String
-
Constructor Details
-
Helpers
public Helpers()
-
-
Method Details
-
toRootLowerCase
-
isWindows
public static boolean isWindows() -
makePattern
-
compareIdentityHash
-
identityHashComparator
Create a comparator which will efficiently useSystem.identityHashCode, unless that happens to be the same for two non-equals objects, in which case the supplied “real” comparator is used; the comparator must be consistent with equals, otherwise it would not be an enhancement over the identityHashCode. -
currentTimeMillisToUTCString
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
-
base64chars
-
base64
-
base64$default$2
-
Requiring
-