Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for toByte (0.15 sec)

  1. src/main/java/org/codelibs/core/convert/ByteConversionUtil.java

         * @return 変換された{@link Byte}
         */
        public static Byte toByte(final Object o) {
            return toByte(o, null);
        }
    
        /**
         * {@link Byte}に変換します。
         *
         * @param o
         *            変換元のオブジェクト
         * @param pattern
         *            パターン文字列
         * @return 変換された{@link Byte}
         */
        public static Byte toByte(final Object o, final String pattern) {
            if (o == null) {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/convert/ByteConversionUtilTest.java

     *
     */
    public class ByteConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testToByte() throws Exception {
            assertEquals(new Byte("100"), ByteConversionUtil.toByte("100"));
        }
    
        /**
         * @throws Exception
         */
        public void testToPrimitiveByte() throws Exception {
            assertEquals(100, ByteConversionUtil.toPrimitiveByte("100"));
        }
    
        /**
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/convert/NumberConversionUtil.java

            } else if (type == BigInteger.class) {
                return BigIntegerConversionUtil.toBigInteger(o);
            } else if (type == Byte.class) {
                return ByteConversionUtil.toByte(o);
            }
            return o;
        }
    
        /**
         * 指定されたプリミティブ型に対応するラッパー型に変換して返します。
         *
         * @param type
         *            プリミティブ型
         * @param o
         *            変換元のオブジェクト
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/beans/impl/BeanDescImpl.java

            if (paramTypes[index].isPrimitive()) {
                if (paramTypes[index] == byte.class) {
                    args[index] = ByteConversionUtil.toByte(args[index]);
                    return true;
                } else if (paramTypes[index] == short.class) {
                    args[index] = ShortConversionUtil.toShort(args[index]);
                    return true;
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 26.1K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/core/convert/TimeConversionUtilTest.java

        /**
         * @throws Exception
         */
        @Test
        public void testToDate_Null() throws Exception {
            assertThat(toDate(null), is(nullValue()));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testToDate_EmptyString() throws Exception {
            assertThat(toDate(""), is(nullValue()));
        }
    
        /**
         * @throws Exception
         */
        @Test
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/beans/impl/PropertyDescImpl.java

                try {
                    return TimestampConversionUtil.toDate(arg);
                } catch (final ParseRuntimeException ex) {
                    try {
                        return DateConversionUtil.toDate(arg);
                    } catch (final ParseRuntimeException ex2) {
                        return TimeConversionUtil.toDate(arg);
                    }
                }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/convert/DateConversionUtil.java

         */
        public static Date toDate(final Object src) {
            return toDate(src, null, LocaleUtil.getDefault());
        }
    
        /**
         * オブジェクトを{@link Date}に変換します。
         *
         * @param src
         *            変換元のオブジェクト
         * @param pattern
         *            パターン文字列
         * @return 変換された{@link Date}
         */
        public static Date toDate(final Object src, final String pattern) {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 21.5K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/core/beans/converter/DateConverter.java

            this.pattern = pattern;
        }
    
        @Override
        public Object getAsObject(final String value) {
            if (isEmpty(value)) {
                return null;
            }
            return DateConversionUtil.toDate(value, pattern);
        }
    
        @Override
        public String getAsString(final Object value) {
            if (value == null) {
                return null;
            }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/convert/TimeConversionUtil.java

         */
        public static Date toDate(final Object src) {
            return toDate(src, null, LocaleUtil.getDefault());
        }
    
        /**
         * オブジェクトを{@link Date}に変換します。
         *
         * @param src
         *            変換元のオブジェクト
         * @param pattern
         *            パターン文字列
         * @return 変換された{@link Date}
         */
        public static Date toDate(final Object src, final String pattern) {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 21.2K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/core/convert/DateConversionUtilTest.java

        /**
         * @throws Exception
         */
        @Test
        public void testToDate_Null() throws Exception {
            assertThat(toDate(null), is(nullValue()));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testToDate_EmptyString() throws Exception {
            assertThat(toDate(""), is(nullValue()));
        }
    
        /**
         * @throws Exception
         */
        @Test
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 9.4K bytes
    - Viewed (0)
Back to top