org.apache.lucene.benchmark.byTask.utils

## Class Format

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

-     public class Format
      extends java.lang.Object

  Formatting utilities (for reports).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Format()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `format(int numFracDigits, double f, java.lang.String col)`
    `static java.lang.String` | `format(int numFracDigits, float f, java.lang.String col)` Padd a number from left.
    `static java.lang.String` | `format(int n, java.lang.String col)` Pad a number from left.
    `static java.lang.String` | `format(java.lang.String s, java.lang.String col)` Pad a string from right.
    `static java.lang.String` | `formatPaddLeft(java.lang.String s, java.lang.String col)` Pad a string from left.
    `static java.lang.String` | `formatPaddRight(int numFracDigits, double f, java.lang.String col)`
    `static java.lang.String` | `formatPaddRight(int numFracDigits, float f, java.lang.String col)` Pad a number from right.
    `static java.lang.String` | `simpleName(java.lang.Class cls)` Extract simple class name

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

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

- - ### Constructor Detail

    - #### Format

          public Format()

  - ### Method Detail

    - #### format

          public static java.lang.String format(int numFracDigits,
                                                float f,
                                                java.lang.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 java.lang.String format(int numFracDigits,
                                                double f,
                                                java.lang.String col)

    - #### formatPaddRight

          public static java.lang.String formatPaddRight(int numFracDigits,
                                                         float f,
                                                         java.lang.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 java.lang.String formatPaddRight(int numFracDigits,
                                                         double f,
                                                         java.lang.String col)

    - #### format

          public static java.lang.String format(int n,
                                                java.lang.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 java.lang.String format(java.lang.String s,
                                                java.lang.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 java.lang.String formatPaddLeft(java.lang.String s,
                                                        java.lang.String col)

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

    - #### simpleName

          public static java.lang.String simpleName(java.lang.Class cls)

      Extract simple class name
      Parameters:
        `cls` - class whose simple name is required
      Returns:
        simple class name

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.