Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 97 for ValueOf (0.04 sec)

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

            } else if (o instanceof String) {
                return toShort((String) o);
            } else if (o instanceof java.util.Date) {
                if (pattern != null) {
                    return Short.valueOf(new SimpleDateFormat(pattern).format(o));
                }
                return (short) ((java.util.Date) o).getTime();
            } else if (o instanceof Boolean) {
                return ((Boolean) o) ? (short) 1 : (short) 0;
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/beans/impl/PropertyDescImplTest.java

            final MyBean myBean = new MyBean();
            final BeanDesc beanDesc = new BeanDescImpl(MyBean.class);
            final PropertyDesc propDesc = beanDesc.getPropertyDesc("ggg");
            propDesc.setValue(myBean, Integer.valueOf(1));
            assertThat(myBean.getGgg(), is(new BigDecimal(1)));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testSetTimestampValue() throws Exception {
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Fri Jun 20 13:40:57 UTC 2025
    - 11K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/convert/IntegerConversionUtil.java

            case java.util.Date d -> pattern != null ? Integer.valueOf(new SimpleDateFormat(pattern).format(d)) : (int) d.getTime();
            case Boolean b -> b ? 1 : 0;
            default -> toInteger(o.toString());
            };
        }
    
        private static Integer toInteger(final String s) {
            if (StringUtil.isEmpty(s)) {
                return null;
            }
            return Integer.valueOf(DecimalFormatUtil.normalize(s));
        }
    
        /**
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  4. fess-crawler/src/test/java/org/codelibs/fess/crawler/entity/RequestDataTest.java

            // Test Method enum values
            Method[] methods = Method.values();
            assertEquals(3, methods.length);
    
            assertEquals(Method.GET, Method.valueOf("GET"));
            assertEquals(Method.POST, Method.valueOf("POST"));
            assertEquals(Method.HEAD, Method.valueOf("HEAD"));
        }
    
        public void test_complexScenario() {
            // Test a complex scenario with multiple operations
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Thu Nov 13 13:29:22 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/core/convert/LongConversionUtilTest.java

    /**
     * @author higa
     *
     */
    public class LongConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testToLong() throws Exception {
            assertEquals(Long.valueOf("1000"), LongConversionUtil.toLong("1,000"));
        }
    
        /**
         * @throws Exception
         */
        public void testToPrimitiveLong() throws Exception {
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Fri Jun 20 13:40:57 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/core/beans/util/CopyOptionsTest.java

            assertThat(new CopyOptions().convertValue(Integer.valueOf(1), "aaa", null), is((Object) 1));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testConvertValue_propertyConverter_asString() throws Exception {
            assertThat(new CopyOptions().converter(new NumberConverter("##0"), "aaa").convertValue(Integer.valueOf(1), "aaa", null),
                    is((Object) "1"));
        }
    
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Fri Jun 20 13:40:57 UTC 2025
    - 12K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/core/convert/ShortConversionUtilTest.java

    /**
     * @author higa
     *
     */
    public class ShortConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testToShort() throws Exception {
            assertEquals(Short.valueOf("1000"), ShortConversionUtil.toShort("1,000"));
        }
    
        /**
         * @throws Exception
         */
        public void testToPrimitiveShort() throws Exception {
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Fri Jun 20 13:40:57 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/core/convert/ByteConversionUtilTest.java

    /**
     * @author higa
     *
     */
    public class ByteConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testToByte() throws Exception {
            assertEquals(Byte.valueOf("100"), ByteConversionUtil.toByte("100"));
        }
    
        /**
         * @throws Exception
         */
        public void testToPrimitiveByte() throws Exception {
            assertEquals(100, ByteConversionUtil.toPrimitiveByte("100"));
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Fri Jun 20 13:40:57 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/core/convert/DoubleConversionUtilTest.java

    /**
     * @author higa
     *
     */
    public class DoubleConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testToDouble() throws Exception {
            assertEquals(Double.valueOf("1000.5"), DoubleConversionUtil.toDouble("1,000.5"));
        }
    
        /**
         * @throws Exception
         */
        public void testToPrimitiveDouble() throws Exception {
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Fri Jun 20 13:40:57 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/core/convert/FloatConversionUtilTest.java

    /**
     * @author higa
     *
     */
    public class FloatConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testToFloat() throws Exception {
            assertEquals(Float.valueOf("1000.5"), FloatConversionUtil.toFloat("1,000.5"));
        }
    
        /**
         * @throws Exception
         */
        public void testToPrimitiveFloat() throws Exception {
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Fri Jun 20 13:40:57 UTC 2025
    - 1.5K bytes
    - Viewed (0)
Back to top