Author: lektran
Date: Sat Apr 17 07:12:33 2010 New Revision: 935139 URL: http://svn.apache.org/viewvc?rev=935139&view=rev Log: Removed unused imports and added @Override where needed Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/NumberConverters.java Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/NumberConverters.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/NumberConverters.java?rev=935139&r1=935138&r2=935139&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/NumberConverters.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/NumberConverters.java Sat Apr 17 07:12:33 2010 @@ -23,16 +23,11 @@ import java.math.BigInteger; import java.text.DecimalFormat; import java.text.NumberFormat; import java.text.ParseException; -import java.util.List; import java.util.Locale; -import java.util.Set; import java.util.TimeZone; import org.ofbiz.base.util.StringUtil; -import javolution.util.FastList; -import javolution.util.FastSet; - /** Number Converter classes. */ public class NumberConverters implements ConverterLoader { @@ -145,6 +140,7 @@ public class NumberConverters implements super(BigDecimal.class); } + @Override protected String format(BigDecimal obj, NumberFormat nf) throws ConversionException { return nf.format(obj.doubleValue()); } @@ -165,6 +161,7 @@ public class NumberConverters implements super(BigInteger.class); } + @Override protected String format(BigInteger obj, NumberFormat nf) throws ConversionException { return nf.format(obj.doubleValue()); } @@ -175,6 +172,7 @@ public class NumberConverters implements super(Byte.class); } + @Override protected String format(Byte obj, NumberFormat nf) throws ConversionException { return nf.format(obj.floatValue()); } @@ -189,6 +187,7 @@ public class NumberConverters implements return new BigInteger(obj); } + @Override protected BigInteger convert(Number number) throws ConversionException { return BigInteger.valueOf(number.longValue()); } @@ -199,6 +198,7 @@ public class NumberConverters implements super(Double.class); } + @Override protected String format(Double obj, NumberFormat nf) throws ConversionException { return nf.format(obj.doubleValue()); } @@ -219,6 +219,7 @@ public class NumberConverters implements super(Float.class); } + @Override protected String format(Float obj, NumberFormat nf) throws ConversionException { return nf.format(obj.floatValue()); } @@ -249,6 +250,7 @@ public class NumberConverters implements super(Integer.class); } + @Override protected String format(Integer obj, NumberFormat nf) throws ConversionException { return nf.format(obj.intValue()); } @@ -279,6 +281,7 @@ public class NumberConverters implements super(Long.class); } + @Override protected String format(Long obj, NumberFormat nf) throws ConversionException { return nf.format(obj.longValue()); } @@ -289,6 +292,7 @@ public class NumberConverters implements super(Short.class); } + @Override protected String format(Short obj, NumberFormat nf) throws ConversionException { return nf.format(obj.floatValue()); } @@ -303,6 +307,7 @@ public class NumberConverters implements return new BigDecimal(obj); } + @Override protected BigDecimal convert(Number number) throws ConversionException { if (number instanceof BigDecimal) { return (BigDecimal) number; @@ -330,6 +335,7 @@ public class NumberConverters implements return Double.valueOf(obj); } + @Override protected Double convert(Number number) throws ConversionException { return number.doubleValue(); } @@ -344,6 +350,7 @@ public class NumberConverters implements return Float.valueOf(obj); } + @Override protected Float convert(Number number) throws ConversionException { return number.floatValue(); } @@ -358,6 +365,7 @@ public class NumberConverters implements return Integer.valueOf(obj); } + @Override protected Integer convert(Number number) throws ConversionException { return number.intValue(); } @@ -372,6 +380,7 @@ public class NumberConverters implements return Long.valueOf(obj); } + @Override protected Long convert(Number number) throws ConversionException { return number.longValue(); } |
Free forum by Nabble | Edit this page |