Class SimpleFormatterImpl.IterInternal

  • Enclosing class:
    SimpleFormatterImpl

    public static class SimpleFormatterImpl.IterInternal
    extends java.lang.Object
    Internal iterator interface for maximum efficiency. Usage boilerplate:
     long state = 0;
     while (true) {
         state = IterInternal.step(state, compiledPattern, output);
         if (state == IterInternal.DONE) {
             break;
         }
         int argIndex = IterInternal.getArgIndex(state);
         // Append the string corresponding to argIndex to output
     }
     
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long DONE  
    • Constructor Summary

      Constructors 
      Constructor Description
      IterInternal()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int getArgIndex​(long state)  
      static long step​(long state, java.lang.CharSequence compiledPattern, java.lang.Appendable output)  
      • Methods inherited from class java.lang.Object

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

      • IterInternal

        public IterInternal()
    • Method Detail

      • step

        public static long step​(long state,
                                java.lang.CharSequence compiledPattern,
                                java.lang.Appendable output)
      • getArgIndex

        public static int getArgIndex​(long state)