commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adri...@apache.org
Subject svn commit: r1042441 - /commons/sandbox/convert/trunk/src/main/java/org/apache/commons/convert/NumberConverters.java
Date Sun, 05 Dec 2010 20:50:52 GMT
Author: adrianc
Date: Sun Dec  5 20:50:51 2010
New Revision: 1042441

URL: http://svn.apache.org/viewvc?rev=1042441&view=rev
Log:
Removed some unnecessary converters. Those conversions were already handled with generic converters.

Modified:
    commons/sandbox/convert/trunk/src/main/java/org/apache/commons/convert/NumberConverters.java

Modified: commons/sandbox/convert/trunk/src/main/java/org/apache/commons/convert/NumberConverters.java
URL: http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/main/java/org/apache/commons/convert/NumberConverters.java?rev=1042441&r1=1042440&r2=1042441&view=diff
==============================================================================
--- commons/sandbox/convert/trunk/src/main/java/org/apache/commons/convert/NumberConverters.java
(original)
+++ commons/sandbox/convert/trunk/src/main/java/org/apache/commons/convert/NumberConverters.java
Sun Dec  5 20:50:51 2010
@@ -150,16 +150,6 @@ public class NumberConverters implements
         }
     }
 
-    public static class DoubleToBigDecimal extends AbstractConverter<Double, BigDecimal>
{
-        public DoubleToBigDecimal() {
-            super(Double.class, BigDecimal.class);
-        }
-
-        public BigDecimal convert(Double obj) throws ConversionException {
-            return BigDecimal.valueOf(obj.doubleValue());
-        }
-    }
-
     /**
      * An object that converts a <code>Double</code> to a
      * <code>String</code>.
@@ -174,16 +164,6 @@ public class NumberConverters implements
         }
     }
 
-    public static class FloatToBigDecimal extends AbstractConverter<Float, BigDecimal>
{
-        public FloatToBigDecimal() {
-            super(Float.class, BigDecimal.class);
-        }
-
-        public BigDecimal convert(Float obj) throws ConversionException {
-            return BigDecimal.valueOf(obj.doubleValue());
-        }
-    }
-
     /**
      * An object that converts a <code>Float</code> to a
      * <code>String</code>.
@@ -310,26 +290,6 @@ public class NumberConverters implements
         }
     }
 
-    public static class IntegerToBigDecimal extends AbstractConverter<Integer, BigDecimal>
{
-        public IntegerToBigDecimal() {
-            super(Integer.class, BigDecimal.class);
-        }
-
-        public BigDecimal convert(Integer obj) throws ConversionException {
-            return BigDecimal.valueOf(obj.intValue());
-        }
-    }
-
-    public static class IntegerToByte extends AbstractConverter<Integer, Byte> {
-        public IntegerToByte() {
-            super(Integer.class, Byte.class);
-        }
-
-        public Byte convert(Integer obj) throws ConversionException {
-            return obj.byteValue();
-        }
-    }
-
     /**
      * An object that converts an <code>Integer</code> to a
      * <code>String</code>.
@@ -358,16 +318,6 @@ public class NumberConverters implements
         }
     }
 
-    public static class LongToByte extends AbstractConverter<Long, Byte> {
-        public LongToByte() {
-            super(Long.class, Byte.class);
-        }
-
-        public Byte convert(Long obj) throws ConversionException {
-            return obj.byteValue();
-        }
-    }
-
     /**
      * An object that converts a <code>Long</code> to a
      * <code>String</code>.



Mime
View raw message