Documentation of 'org.encog.util.Format' Java class
Format
org.encog.util

Class Format



  • public final class Format
    extends java.lang.Object
    Provides the ability for Encog to format numbers and times.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String formatDouble(double d, int i)
      Format a double.
      static java.lang.String formatInteger(int i)
      Format an integer.
      static java.lang.String formatMemory(long memory)
      Format a memory amount, to something like 32 MB.
      static java.lang.String formatPercent(double e)
      Format a percent.
      static java.lang.String formatPercentWhole(double e)
      Format a percent with no decimal places.
      static java.lang.String formatTimeSpan(int seconds)
      Format a time span as seconds, minutes, hours and days.
      static java.lang.String formatYesNo(boolean b)
      Format a boolean as yes/no.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • formatDouble

        public static java.lang.String formatDouble(double d,
                                                    int i)
        Format a double.
        Parameters:
        d - The double value to format.
        i - The number of decimal places.
        Returns:
        The double as a string.
      • formatInteger

        public static java.lang.String formatInteger(int i)
        Format an integer.
        Parameters:
        i - The integer to format.
        Returns:
        The integer as a string.
      • formatMemory

        public static java.lang.String formatMemory(long memory)
        Format a memory amount, to something like 32 MB.
        Parameters:
        memory - The amount of bytes.
        Returns:
        The formatted memory size.
      • formatPercent

        public static java.lang.String formatPercent(double e)
        Format a percent. Using 6 decimal places.
        Parameters:
        e - The percent to format.
        Returns:
        The formatted percent.
      • formatPercentWhole

        public static java.lang.String formatPercentWhole(double e)
        Format a percent with no decimal places.
        Parameters:
        e - The format to percent.
        Returns:
        The formatted percent.
      • formatTimeSpan

        public static java.lang.String formatTimeSpan(int seconds)
        Format a time span as seconds, minutes, hours and days.
        Parameters:
        seconds - The number of seconds in the timespan.
        Returns:
        The formatted timespan.
      • formatYesNo

        public static java.lang.String formatYesNo(boolean b)
        Format a boolean as yes/no.
        Parameters:
        b - The boolean value.
        Returns:
        The yes/no result.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.