Documentation of 'org.encog.util.csv.CSVFormat' Java class
CSVFormat
org.encog.util.csv

Class CSVFormat

  • All Implemented Interfaces:
    java.io.Serializable


    public class CSVFormat
    extends java.lang.Object
    implements java.io.Serializable
    Specifies a CSV format. This allows you to determine if a decimal point or decimal comma is uses. It also specifies the character that should be used to separate numbers.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static CSVFormat DECIMAL_COMMA
      Use a decimal comma, and a semicolon to separate numbers.
      static CSVFormat DECIMAL_POINT
      Use a decimal point, and a comma to separate numbers.
      static CSVFormat EG_FORMAT
      EG files, internally use a decimal point and comma separator.
      static CSVFormat ENGLISH
      Decimal point is typically used in English speaking counties.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CSVFormat()
      By default use USA conventions.
      CSVFormat(char decimal, char separator)
      Construct a CSV format with he specified decimal and separator characters.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String format(double d, int digits)
      Format the specified number to a string with the specified number of fractional digits.
      char getDecimal() 
      static char getDecimalCharacter()
      Get the decimal character currently in use by the computer's default location.
      java.text.NumberFormat getNumberFormatter() 
      char getSeparator() 
      boolean isValid(java.lang.String str)
      Determine if the string can be parsed.
      double parse(java.lang.String str)
      Parse the specified string to a double.
      • Methods inherited from class java.lang.Object

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

      • DECIMAL_POINT

        public static final CSVFormat DECIMAL_POINT
        Use a decimal point, and a comma to separate numbers.
      • DECIMAL_COMMA

        public static final CSVFormat DECIMAL_COMMA
        Use a decimal comma, and a semicolon to separate numbers.
      • ENGLISH

        public static final CSVFormat ENGLISH
        Decimal point is typically used in English speaking counties.
      • EG_FORMAT

        public static final CSVFormat EG_FORMAT
        EG files, internally use a decimal point and comma separator.
    • Constructor Detail

      • CSVFormat

        public CSVFormat()
        By default use USA conventions.
      • CSVFormat

        public CSVFormat(char decimal,
                         char separator)
        Construct a CSV format with he specified decimal and separator characters.
        Parameters:
        decimal - The decimal character.
        separator - The separator character.
    • Method Detail

      • getDecimalCharacter

        public static char getDecimalCharacter()
        Get the decimal character currently in use by the computer's default location.
        Returns:
        The decimal character used.
      • format

        public java.lang.String format(double d,
                                       int digits)
        Format the specified number to a string with the specified number of fractional digits.
        Parameters:
        d - The number to format.
        digits - The number of fractional digits.
        Returns:
        The number formatted as a string.
      • getDecimal

        public char getDecimal()
        Returns:
        The decimal character.
      • getNumberFormatter

        public java.text.NumberFormat getNumberFormatter()
        Returns:
        The number formatter.
      • getSeparator

        public char getSeparator()
        Returns:
        The separator character.
      • isValid

        public boolean isValid(java.lang.String str)
        Determine if the string can be parsed.
        Parameters:
        str - The string to compare.
        Returns:
        True, if the string can be parsed.
      • parse

        public double parse(java.lang.String str)
        Parse the specified string to a double.
        Parameters:
        str - The string to parse.
        Returns:
        The parsed number.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.