Class MiscImpl


  • public class MiscImpl
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String blanks  
      static java.lang.String dots  
    • Constructor Summary

      Constructors 
      Constructor Description
      MiscImpl()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String elide​(java.lang.String s, int n)  
      static java.lang.String elide​(java.lang.String s, int n, boolean pad)  
      static java.lang.String getCaller()  
      static java.lang.StringBuilder getCallers​(int s, int n)  
      static java.lang.String replaceWhiteSpace​(java.lang.String s, java.lang.String replacement)  
      static void timeLoops​(java.lang.String title, int iterations, java.util.concurrent.Callable<java.lang.Object> r)  
      • Methods inherited from class java.lang.Object

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

      • MiscImpl

        public MiscImpl()
    • Method Detail

      • replaceWhiteSpace

        public static java.lang.String replaceWhiteSpace​(java.lang.String s,
                                                         java.lang.String replacement)
      • getCallers

        public static java.lang.StringBuilder getCallers​(int s,
                                                         int n)
        Parameters:
        s - starting frames above invoker
        n - max number of callers to return
        Returns:
        x called by: y ...
      • getCaller

        public static java.lang.String getCaller()
        Returns:
        the name of the caller in the stack
      • elide

        public static java.lang.String elide​(java.lang.String s,
                                             int n)
      • elide

        public static java.lang.String elide​(java.lang.String s,
                                             int n,
                                             boolean pad)
      • timeLoops

        public static void timeLoops​(java.lang.String title,
                                     int iterations,
                                     java.util.concurrent.Callable<java.lang.Object> r)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception