You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2013/08/05 14:43:24 UTC

svn commit: r1510455 - in /commons/proper/csv/trunk/src: main/java/org/apache/commons/csv/ test/java/org/apache/commons/csv/

Author: ggregory
Date: Mon Aug  5 12:43:23 2013
New Revision: 1510455

URL: http://svn.apache.org/r1510455
Log:
Remove primitive APIs in CSVRecord.

Removed:
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVRecordBooleanTest.java
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVRecordIntTest.java
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVRecordLongTest.java
Modified:
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java

Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java?rev=1510455&r1=1510454&r2=1510455&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java Mon Aug  5 12:43:23 2013
@@ -108,23 +108,6 @@ public class CSVRecord implements Serial
     }
 
     /**
-     * Returns a value by name.
-     *
-     * @param name
-     *            the name of the column to be retrieved.
-     * @return the column value
-     * @throws IllegalStateException
-     *             if no header mapping was provided
-     * @throws IllegalArgumentException
-     *             if the record is inconsistent
-     * @see #isConsistent()
-     */
-    public boolean getBoolean(String name) {
-        String s = this.get(name);
-        return s != null ? Boolean.parseBoolean(s) : false;
-    }
-
-    /**
      * Returns the comment for this record, if any.
      *
      * @return the comment for this record, or null if no comment for this
@@ -135,40 +118,6 @@ public class CSVRecord implements Serial
     }
 
     /**
-     * Returns a value by name.
-     *
-     * @param name
-     *            the name of the column to be retrieved.
-     * @return the column value
-     * @throws IllegalStateException
-     *             if no header mapping was provided
-     * @throws IllegalArgumentException
-     *             if the record is inconsistent
-     * @see #isConsistent()
-     */
-    public int getInt(String name) {
-        String s = this.get(name);
-        return s != null ? Integer.parseInt(s) : 0;
-    }
-
-    /**
-     * Returns a value by name.
-     *
-     * @param name
-     *            the name of the column to be retrieved.
-     * @return the column value
-     * @throws IllegalStateException
-     *             if no header mapping was provided
-     * @throws IllegalArgumentException
-     *             if the record is inconsistent
-     * @see #isConsistent()
-     */
-    public long getLong(String name) {
-        String s = this.get(name);
-        return s != null ? Long.parseLong(s) : 0;
-    }
-
-    /**
      * Returns the number of this record in the parsed CSV file.
      *
      * @return the number of this record.