Class ExpressionFormatter


  • public class ExpressionFormatter
    extends java.lang.Object
    Formats any parenthesis expression. In addition to the obvious this can also operate in "two column mode", wherein each chunk that will be formatted on a separate line may optionally contain a prefix marked by a start and end tab sign which will be printed in a left column of the given fixed size. The prefix itself is not formatted but will be cut if too long.
    Author:
    bratseth
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String format​(java.lang.String parenthesisExpression)  
      static ExpressionFormatter inTwoColumnMode​(int firstColumnSize, int secondColumnSize)  
      static java.lang.String on​(java.lang.String parenthesisExpression)
      Convenience method creating a formatter and using it to format the given expression
      static ExpressionFormatter withLineLength​(int maxLineLength)  
      • Methods inherited from class java.lang.Object

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

      • format

        public java.lang.String format​(java.lang.String parenthesisExpression)
      • on

        public static java.lang.String on​(java.lang.String parenthesisExpression)
        Convenience method creating a formatter and using it to format the given expression
      • inTwoColumnMode

        public static ExpressionFormatter inTwoColumnMode​(int firstColumnSize,
                                                          int secondColumnSize)