public final class Format extends Object
This file was generated by the OpenTrafficSim value classes generator, 09 mrt, 2015
Copyright (c) 2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULTPRECISION
Default number of fraction digits.
|
static int |
DEFAULTSIZE
Default total width of formatted value.
|
Modifier and Type | Method and Description |
---|---|
static String |
format(double value)
Format a floating point value.
|
static String |
format(double value,
int size)
Format a floating point value.
|
static String |
format(double value,
int width,
int precision)
Format a floating point value.
|
static String |
format(float value)
Format a floating point value.
|
static String |
format(float value,
int size)
Format a floating point value.
|
static String |
format(float value,
int width,
int precision)
Format a floating point value.
|
public static final int DEFAULTSIZE
public static final int DEFAULTPRECISION
public static String format(float value, int width, int precision)
value
- float; the value to formatwidth
- int; the number of characters in the resultprecision
- int; the number of fractional digits in the resultpublic static String format(float value, int size)
value
- float; the value to formatsize
- int; the number of characters in the resultpublic static String format(float value)
value
- float; the value to formatpublic static String format(double value, int width, int precision)
value
- double; the value to formatwidth
- int; the number of characters in the resultprecision
- int; the number of fractional digits in the resultpublic static String format(double value, int size)
value
- double; the value to formatsize
- int; the number of characters in the resultpublic static String format(double value)
value
- double; the value to formatCopyright © 2014–2015 Delft University of Technology. All rights reserved.