Format (Lucene 2.4.1 API)
Keywords: org.apache.lucene.benchmark.byTask.utils.Format class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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
`Format()`

Method Summary
`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)` Padd a number from left.
`static String` | `format(String s, String col)` Padd a string from right.
`static String` | `formatPaddLeft(String s, String col)` Padd a string from left.
`static String` | `formatPaddRight(int numFracDigits, double f, String col)`
`static String` | `formatPaddRight(int numFracDigits, float f, String col)` Padd a number from right.
`static String` | `simpleName(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 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)

  Padd 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)

  Padd 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)

  Padd 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)

  Padd a string from left.

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

### simpleName

    public static String simpleName(Class cls)

  Extract simple class name

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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