Package com.yahoo.text
Class ExpressionFormatter
- java.lang.Object
-
- com.yahoo.text.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 expressionstatic ExpressionFormatter
withLineLength(int maxLineLength)
-
-
-
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
-
withLineLength
public static ExpressionFormatter withLineLength(int maxLineLength)
-
inTwoColumnMode
public static ExpressionFormatter inTwoColumnMode(int firstColumnSize, int secondColumnSize)
-
-