Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 185 for New (0.12 sec)

  1. src/test/java/org/codelibs/core/beans/util/BeanUtilTest.java

         */
        @Test
        public void testCopyBeanToBean_converter() throws Exception {
            final Bean bean = new Bean();
            bean.aaa = "1,000";
            final Bean2 bean2 = new Bean2();
            BeanUtil.copyBeanToBean(bean, bean2, converter(new NumberConverter("#,##0")));
            assertThat(bean2.aaa, is(new Integer(1000)));
        }
    
        /**
         * @throws Exception
         */
        @Test
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 34.5K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/lang/ClassLoaderUtilTest.java

         */
        @Test
        public void testIsAncestor() throws Exception {
            final ClassLoader cl1 = new URLClassLoader(new URL[] { new URL("file:/foo") }, null);
            final ClassLoader cl2 = new URLClassLoader(new URL[] { new URL("file:/bar") }, cl1);
            final ClassLoader cl3 = new URLClassLoader(new URL[] { new URL("file:/baz") }, cl2);
    
            assertThat(ClassLoaderUtil.isAncestor(cl3, cl2), is(true));
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/convert/NumberConversionUtil.java

            } else if (type == double.class) {
                final Double d = DoubleConversionUtil.toDouble(o);
                if (d != null) {
                    return d;
                }
                return new Double(0);
            } else if (type == long.class) {
                final Long l = LongConversionUtil.toLong(o);
                if (l != null) {
                    return l;
                }
                return Long.valueOf(0);
    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/test/java/org/codelibs/core/io/CopyUtilTest.java

        static byte[] srcBytes = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
    
        static String srcString = "ABCDEFGHIJKLMN";
    
        static String urlString = "あいうえお";
    
        InputStream is = new ByteArrayInputStream(srcBytes);
    
        ByteArrayOutputStream os = new ByteArrayOutputStream();
    
        Reader reader = new StringReader(srcString);
    
        StringWriter writer = new StringWriter();
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  5. src/test/java/org/codelibs/core/convert/NumberConversionUtilTest.java

            assertEquals(new Byte("1"), NumberConversionUtil.convertNumber(Byte.class, "1"));
        }
    
        /**
         * @throws Exception
         */
        public void testConvertNumber_primitiveWrapper() throws Exception {
            assertEquals(new Byte("1"), NumberConversionUtil.convertPrimitiveWrapper(byte.class, "1"));
            assertEquals(new Byte("0"), NumberConversionUtil.convertPrimitiveWrapper(byte.class, null));
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/core/convert/ByteConversionUtilTest.java

    /**
     * @author higa
     *
     */
    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 {
    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)
  7. src/test/java/org/codelibs/core/convert/LongConversionUtilTest.java

    /**
     * @author higa
     *
     */
    public class LongConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testToLong() throws Exception {
            assertEquals(new Long("1000"), LongConversionUtil.toLong("1,000"));
        }
    
        /**
         * @throws Exception
         */
        public void testToPrimitiveLong() throws Exception {
    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)
  8. src/main/java/org/codelibs/core/io/LineIterator.java

            assertArgumentNotNull("reader", reader);
    
            return () -> new LineIterator(reader);
        }
    
        /**
         * インスタンスを構築します。
         *
         * @param reader
         *            文字列を読み込む{@link Reader}。{@literal null}であってはいけません
         */
        public LineIterator(final Reader reader) {
            assertArgumentNotNull("reader", reader);
            this.reader = new BufferedReader(reader);
        }
    
        /**
         * インスタンスを構築します。
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/core/convert/FloatConversionUtilTest.java

    /**
     * @author higa
     *
     */
    public class FloatConversionUtilTest extends TestCase {
    
        /**
         * @throws Exception
         */
        public void testToFloat() throws Exception {
            assertEquals(new Float("1000.5"), FloatConversionUtil.toFloat("1,000.5"));
        }
    
        /**
         * @throws Exception
         */
        public void testToPrimitiveFloat() throws Exception {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/core/timer/TimeoutManagerTest.java

            TimeoutManager.getInstance().clear();
        }
    
        /**
         * @throws Exception
         */
        public void testExpired() throws Exception {
            TimeoutTask task = TimeoutManager.getInstance().addTimeoutTarget(new TimeoutTarget() {
                public void expired() {
                    System.out.println("expired");
                    expiredCount++;
                }
            }, 1, true);
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.1K bytes
    - Viewed (0)
Back to top