Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for getSize (0.16 sec)

  1. src/test/java/org/codelibs/core/convert/TimeConversionUtilTest.java

            assertThat(new SimpleDateFormat("HH:mm:ss").format(calendar.getTime()), is("11:49:00"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testToCalendar_MediumStyle() throws Exception {
            final Calendar calendar = toCalendar("11:49:10");
            assertThat(new SimpleDateFormat("HH:mm:ss").format(calendar.getTime()), is("11:49:10"));
        }
    
        /**
         * @throws Exception
    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)
  2. src/main/java/org/codelibs/core/convert/DoubleConversionUtil.java

            } else if (o instanceof java.util.Date) {
                if (pattern != null) {
                    return new Double(new SimpleDateFormat(pattern).format(o));
                }
                return new Double(((java.util.Date) o).getTime());
            } else {
                return toDouble(o.toString());
            }
        }
    
        private static Double toDouble(final String s) {
            if (StringUtil.isEmpty(s)) {
                return null;
            }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/core/convert/CalendarConversionUtilTest.java

         */
        @Test
        public void testToCalendar() throws Exception {
            final Date date = new Date();
            final Calendar cal = CalendarConversionUtil.toCalendar(date);
            assertEquals(date, cal.getTime());
        }
    
        /**
         *
         * @throws Exception
         */
        @Test
        public void testLocalize() throws Exception {
            final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("JST"));
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/convert/ByteConversionUtil.java

            } else if (o instanceof java.util.Date) {
                if (pattern != null) {
                    return Byte.valueOf(new SimpleDateFormat(pattern).format(o));
                }
                return (byte) ((java.util.Date) o).getTime();
            } else if (o instanceof Boolean) {
                return ((Boolean) o) ? (byte) 1 : (byte) 0;
            } else {
                return toByte(o.toString());
            }
        }
    
    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)
  5. src/test/java/org/codelibs/core/io/ResourceUtilTest.java

            assertEquals(getRoot() + "Program File", ResourceUtil.getFileName(url));
            url = ResourceUtil.getResource("java/lang/String.class");
            assertNull(ResourceUtil.getFile(url));
        }
    
        private String getRoot() throws IOException {
            final String root = new File("/").getCanonicalPath().replace('\\', '/');
            if (root.startsWith("/")) {
                return root;
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/convert/DateConversionUtil.java

                final Date date = toDate(str, format);
                if (date != null) {
                    return new java.sql.Date(date.getTime());
                }
            }
            final Date date = toDate(str, locale);
            if (date != null) {
                return new java.sql.Date(date.getTime());
            }
            final java.sql.Date sqlDate = toSqlDateJdbcEscape(str);
            if (sqlDate != null) {
                return sqlDate;
    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)
  7. src/main/java/org/codelibs/core/convert/FloatConversionUtil.java

            } else if (o instanceof java.util.Date) {
                if (pattern != null) {
                    return new Float(new SimpleDateFormat(pattern).format(o));
                }
                return new Float(((java.util.Date) o).getTime());
            } else {
                return toFloat(o.toString());
            }
        }
    
        private static Float toFloat(final String s) {
            if (StringUtil.isEmpty(s)) {
                return null;
            }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/core/convert/ShortConversionUtil.java

            } 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;
            } else {
                return toShort(o.toString());
            }
        }
    
    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/main/java/org/codelibs/core/convert/TimeConversionUtil.java

                final Date date = toDate(str, format);
                if (date != null) {
                    return new Time(date.getTime());
                }
            }
            final Date date = toDate(str, locale);
            if (date != null) {
                return new Time(date.getTime());
            }
            final Time time = toSqlTimeJdbcEscape(str);
            if (time != null) {
                return time;
            }
    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

            assertThat(new SimpleDateFormat("yyyy/MM/dd").format(calendar.getTime()), is("2010/09/07"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testToCalendar_MediumStyle() throws Exception {
            final Calendar calendar = toCalendar("2010/9/7");
            assertThat(new SimpleDateFormat("yyyy/MM/dd").format(calendar.getTime()), is("2010/09/07"));
        }
    
        /**
         * @throws Exception
    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