Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for convertNumber (0.08 sec)

  1. src/main/java/org/codelibs/core/beans/impl/PropertyDescImpl.java

        }
    
        private Object convertPrimitiveWrapper(final Object arg) {
            return NumberConversionUtil.convertPrimitiveWrapper(propertyType, arg);
        }
    
        private Object convertNumber(final Object arg) {
            return NumberConversionUtil.convertNumber(propertyType, arg);
        }
    
        private Object convertDate(final Object arg) {
            if (propertyType == java.util.Date.class) {
                try {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/convert/NumberConversionUtil.java

         *
         * @param type
         *            変換先の型
         * @param o
         *            変換元のオブジェクト
         * @return {@literal type}に変換された{@link Number}
         */
        public static Object convertNumber(final Class<?> type, final Object o) {
            if (type == Integer.class) {
                return IntegerConversionUtil.toInteger(o);
            } else if (type == BigDecimal.class) {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/core/convert/NumberConversionUtilTest.java

    public class NumberConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testConvertNumber_byte() throws Exception {
            assertEquals(new Byte("1"), NumberConversionUtil.convertNumber(Byte.class, "1"));
        }
    
        /**
         * @throws Exception
         */
        public void testConvertNumber_primitiveWrapper() throws Exception {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 3.1K bytes
    - Viewed (0)
Back to top