org.encog.util
public final class Format extends Object
Modifier and Type | Field and Description |
---|---|
static double |
HUNDRED_PERCENT
One hundred percent.
|
static long |
MEMORY_GIG
Bytes in a GB.
|
static long |
MEMORY_K
Bytes in a KB.
|
static long |
MEMORY_MEG
Bytes in a MB.
|
static long |
MEMORY_TERA
Bytes in a TB.
|
static long |
MILI_IN_SEC
How many miliseconds in a second.
|
static int |
SECONDS_INA_DAY
Seconds in a day.
|
static int |
SECONDS_INA_HOUR
Seconds in an hour.
|
static int |
SECONDS_INA_MINUTE
Seconds in a minute.
|
Modifier and Type | Method and Description |
---|---|
static String |
formatDouble(double d,
int i)
Format a double.
|
static String |
formatInteger(int i)
Format an integer.
|
static String |
formatMemory(long memory)
Format a memory amount, to something like 32 MB.
|
static String |
formatPercent(double e)
Format a percent.
|
static String |
formatPercentWhole(double e)
Format a percent with no decimal places.
|
static String |
formatTimeSpan(int seconds)
Format a time span as seconds, minutes, hours and days.
|
static String |
formatYesNo(boolean b)
Format a boolean as yes/no.
|
public static final int SECONDS_INA_MINUTE
public static final int SECONDS_INA_HOUR
public static final int SECONDS_INA_DAY
public static final long MEMORY_K
public static final long MEMORY_MEG
public static final long MEMORY_GIG
public static final long MEMORY_TERA
public static final long MILI_IN_SEC
public static final double HUNDRED_PERCENT
public static String formatDouble(double d, int i)
d
- The double value to format.i
- The number of decimal places.public static String formatInteger(int i)
i
- The integer to format.public static String formatMemory(long memory)
memory
- The amount of bytes.public static String formatPercent(double e)
e
- The percent to format.public static String formatPercentWhole(double e)
e
- The format to percent.public static String formatTimeSpan(int seconds)
seconds
- The number of seconds in the timespan.public static String formatYesNo(boolean b)
b
- The boolean value.Copyright © 2014. All Rights Reserved.