Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for TimeConverter (0.06 sec)

  1. src/main/java/org/codelibs/core/beans/converter/TimeConverter.java

    /**
     * 時間用のコンバータです。
     *
     * @author higa
     */
    public class TimeConverter implements Converter {
    
        /**
         * 時間のパターンです。
         */
        protected String pattern;
    
        /**
         * インスタンスを構築します。
         *
         * @param pattern
         *            時間のパターン
         */
        public TimeConverter(final String pattern) {
            assertArgumentNotEmpty("pattern", pattern);
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/beans/converter/TimeConverterTest.java

    /**
     * @author higa
     */
    public class TimeConverterTest {
    
        /**
         * @throws Exception
         */
        @Test
        public void testGetAsObjectAndGetAsString() throws Exception {
            final TimeConverter converter = new TimeConverter("HH:mm:ss");
            final java.sql.Time result = (java.sql.Time) converter.getAsObject("12:34:56");
            System.out.println(result);
            assertThat(converter.getAsString(result), is("12:34:56"));
        }
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/beans/util/CopyOptions.java

         *            このコンバータを適用するプロパティ名の並び。各要素は{@literal null}や空文字列であってはいけません
         * @return このインスタンス自身
         * @see TimeConverter
         */
        public CopyOptions timeConverter(final String pattern, final CharSequence... propertyNames) {
            assertArgumentNotEmpty("pattern", pattern);
    
            return converter(new TimeConverter(pattern), propertyNames);
        }
    
        /**
         * 日時のコンバータを設定します。
         *
         * @param pattern
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/beans/util/CopyOptionsTest.java

                    is((Object) "19700101"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testTimeConverter() throws Exception {
            assertThat(new CopyOptions().timeConverter("ss").convertValue(new java.sql.Time(0), "aaa", String.class), is((Object) "00"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testTimestampConverter() throws Exception {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 12K bytes
    - Viewed (0)
Back to top