Package org.apache.lucene.benchmark.byTask.utils

# Class Format

java.lang.Object
org.apache.lucene.benchmark.byTask.utils.Format

public class Format extends Object
Formatting utilities (for reports).

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Format()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `format(int numFracDigits, double f, String col)`
  `static String`
  `format(int numFracDigits, float f, String col)`
  Padd a number from left.
  `static String`
  `format(int n, String col)`
  Pad a number from left.
  `static String`
  `format(String s, String col)`
  Pad a string from right.
  `static String`
  `formatPaddLeft(String s, String col)`
  Pad a string from left.
  `static String`
  `formatPaddRight(int numFracDigits, double f, String col)`
  `static String`
  `formatPaddRight(int numFracDigits, float f, String col)`
  Pad a number from right.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Format

    public Format()

- ## Method Details

  - ### format

    public static String format(int numFracDigits, float f, String col)
    Padd a number from left.
    Parameters:
      `numFracDigits` - number of digits in fraction part - must be 0 or 1 or 2.
      `f` - number to be formatted.
      `col` - column name (used for deciding on length).
    Returns:
      formatted string.

  - ### format

    public static String format(int numFracDigits, double f, String col)

  - ### formatPaddRight

    public static String formatPaddRight(int numFracDigits, float f, String col)
    Pad a number from right.
    Parameters:
      `numFracDigits` - number of digits in fraction part - must be 0 or 1 or 2.
      `f` - number to be formatted.
      `col` - column name (used for deciding on length).
    Returns:
      formatted string.

  - ### formatPaddRight

    public static String formatPaddRight(int numFracDigits, double f, String col)

  - ### format

    public static String format(int n, String col)
    Pad a number from left.
    Parameters:
      `n` - number to be formatted.
      `col` - column name (used for deciding on length).
    Returns:
      formatted string.

  - ### format

    public static String format(String s, String col)
    Pad a string from right.
    Parameters:
      `s` - string to be formatted.
      `col` - column name (used for deciding on length).
    Returns:
      formatted string.

  - ### formatPaddLeft

    public static String formatPaddLeft(String s, String col)
    Pad a string from left.
    Parameters:
      `s` - string to be formatted.
      `col` - column name (used for deciding on length).
    Returns:
      formatted string.