|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.util.Format
public final class Format
Provides the ability for Encog to format numbers and times.
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |