Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for numberConverter (0.19 sec)

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

    /**
     * 数値用のコンバータです。
     *
     * @author higa
     */
    public class NumberConverter implements Converter {
    
        /**
         * 数値のパターンです。
         */
        protected String pattern;
    
        /**
         * インスタンスを構築します。
         *
         * @param pattern
         *            数値のパターン
         */
        public NumberConverter(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/NumberConverterTest.java

        public void testGetAsObject() throws Exception {
            final NumberConverter converter = new NumberConverter("##0");
            assertThat(converter.getAsObject("100"), is((Object) Long.valueOf("100")));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testGetAsString() throws Exception {
            final NumberConverter converter = new NumberConverter("##0");
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/core/beans/util/BeanUtilTest.java

    import static org.junit.Assert.assertThat;
    
    import java.util.Date;
    import java.util.HashMap;
    import java.util.Map;
    
    import org.codelibs.core.beans.converter.DateConverter;
    import org.codelibs.core.beans.converter.NumberConverter;
    import org.codelibs.core.exception.NullArgumentException;
    import org.junit.Rule;
    import org.junit.Test;
    import org.junit.rules.ExpectedException;
    
    /**
     * @author higa
     */
    public class BeanUtilTest {
    
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/beans/util/CopyOptionsTest.java

            assertThat(new CopyOptions().converter(new NumberConverter("##0"), "aaa").convertValue(new Integer(1), "aaa", null),
                    is((Object) "1"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testConvertValue_propertyConverter_asObject() throws Exception {
            assertThat(new CopyOptions().converter(new NumberConverter("##0"), BeanNames.aaa()).convertValue("1", "aaa", null),
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 12K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/beans/util/CopyOptions.java

         *            このコンバータを適用するプロパティ名の並び。各要素は{@literal null}や空文字列であってはいけません
         * @return このインスタンス自身
         * @see NumberConverter
         */
        public CopyOptions numberConverter(final String pattern, final CharSequence... propertyNames) {
            assertArgumentNotEmpty("pattern", pattern);
    
            return converter(new NumberConverter(pattern), propertyNames);
        }
    
        /**
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 18.6K bytes
    - Viewed (0)
Back to top