Class ExpressionFormatter

java.lang.Object
com.yahoo.text.ExpressionFormatter

public class ExpressionFormatter extends 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 Details

    • format

      public String format(String parenthesisExpression)
    • on

      public static String on(String parenthesisExpression)
      Convenience method creating a formatter and using it to format the given expression
    • withLineLength

      public static ExpressionFormatter withLineLength(int maxLineLength)
    • inTwoColumnMode

      public static ExpressionFormatter inTwoColumnMode(int firstColumnSize, int secondColumnSize)