Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for toShort (0.13 sec)

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

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

     *
     */
    public class ShortConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testToShort() throws Exception {
            assertEquals(new Short("1000"), ShortConversionUtil.toShort("1,000"));
        }
    
        /**
         * @throws Exception
         */
        public void testToPrimitiveShort() throws Exception {
            assertEquals(1000, ShortConversionUtil.toPrimitiveShort("1,000"));
        }
    
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/convert/NumberConversionUtil.java

                return LongConversionUtil.toLong(o);
            } else if (type == Float.class) {
                return FloatConversionUtil.toFloat(o);
            } else if (type == Short.class) {
                return ShortConversionUtil.toShort(o);
            } else if (type == BigInteger.class) {
                return BigIntegerConversionUtil.toBigInteger(o);
            } else if (type == Byte.class) {
                return ByteConversionUtil.toByte(o);
            }
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 5.7K bytes
    - Viewed (0)
Back to top