Class StyleFactory

java.lang.Object
org.jline.style.StyleFactory

public class StyleFactory extends Object
Factory to create styled strings.
Since:
3.4
  • Constructor Details

  • Method Details

    • style

      public AttributedString style(String style, String value)
      Encode string with style applying value.
      Parameters:
      style - the style
      value - the value
      Returns:
      the result string
    • style

      public AttributedString style(String style, String format, Object... params)
      Encode string with style formatted value.
      Parameters:
      style - the style
      format - the format
      params - the parameters
      Returns:
      the result string
      See Also:
    • evaluate

      public AttributedString evaluate(String expression)
      Evaluate a style expression.
      Parameters:
      expression - the expression to evaluate
      Returns:
      the result string
    • evaluate

      public AttributedString evaluate(String format, Object... params)
      Evaluate a style expression with format.
      Parameters:
      format - the format
      params - the parameters
      Returns:
      the result string
      See Also: