Examples of CharacterConverter


Examples of org.apache.commons.beanutils.converters.CharacterConverter

        converters.put(Byte.TYPE, new ByteConverter(defaultByte));
        converters.put(Byte.class, new ByteConverter(defaultByte));
        converters.put(byteArray.getClass(),
                       new ByteArrayConverter(byteArray));
        converters.put(Character.TYPE,
                       new CharacterConverter(defaultCharacter));
        converters.put(Character.class,
                       new CharacterConverter(defaultCharacter));
        converters.put(charArray.getClass(),
                       new CharacterArrayConverter(charArray));
        converters.put(Class.class, new ClassConverter());
        converters.put(Double.TYPE, new DoubleConverter(defaultDouble));
        converters.put(Double.class, new DoubleConverter(defaultDouble));
View Full Code Here

Examples of org.apache.commons.beanutils.converters.CharacterConverter

            ConvertUtils.deregister();
            ConvertUtils.register(new BigDecimalConverter(null), BigDecimal.class);
            ConvertUtils.register(new BigIntegerConverter(null), BigInteger.class);
            ConvertUtils.register(new BooleanConverter(null), Boolean.class);
            ConvertUtils.register(new ByteConverter(null), Byte.class);
            ConvertUtils.register(new CharacterConverter(null), Character.class);
            ConvertUtils.register(new DoubleConverter(null), Double.class);
            ConvertUtils.register(new FloatConverter(null), Float.class);
            ConvertUtils.register(new IntegerConverter(null), Integer.class);
            ConvertUtils.register(new LongConverter(null), Long.class);
            ConvertUtils.register(new ShortConverter(null), Short.class);
View Full Code Here

Examples of org.apache.commons.beanutils.converters.CharacterConverter

      ConvertUtils.deregister();
      ConvertUtils.register(new BigDecimalConverter(null), BigDecimal.class);
      ConvertUtils.register(new BigIntegerConverter(null), BigInteger.class);
      ConvertUtils.register(new BooleanConverter(null), Boolean.class);
      ConvertUtils.register(new ByteConverter(null), Byte.class);
      ConvertUtils.register(new CharacterConverter(null), Character.class);
      ConvertUtils.register(new DoubleConverter(null), Double.class);
      ConvertUtils.register(new FloatConverter(null), Float.class);
      ConvertUtils.register(new IntegerConverter(null), Integer.class);
      ConvertUtils.register(new LongConverter(null), Long.class);
      ConvertUtils.register(new ShortConverter(null), Short.class);
View Full Code Here

Examples of org.apache.commons.beanutils.converters.CharacterConverter

     * @deprecated Register replacement converters for Character.TYPE and
     *  Character.class instead
     */
    public void setDefaultCharacter(char newDefaultCharacter) {
        defaultCharacter = new Character(newDefaultCharacter);
        register(new CharacterConverter(defaultCharacter),
                    Character.TYPE);
        register(new CharacterConverter(defaultCharacter)
                    Character.class);
    }
View Full Code Here

Examples of org.apache.commons.beanutils.converters.CharacterConverter

        register(Byte.TYPE, new ByteConverter(defaultByte));
        register(Byte.class, new ByteConverter(defaultByte));
        register(byteArray.getClass(),
                       new ByteArrayConverter(byteArray));
        register(Character.TYPE,
                       new CharacterConverter(defaultCharacter));
        register(Character.class,
                       new CharacterConverter(defaultCharacter));
        register(charArray.getClass(),
                       new CharacterArrayConverter(charArray));
        register(Class.class, new ClassConverter());
        register(Double.TYPE, new DoubleConverter(defaultDouble));
        register(Double.class, new DoubleConverter(defaultDouble));
View Full Code Here

Examples of org.apache.wicket.util.convert.converter.CharacterConverter

   * Test for character locale conversions.
   */
  @Test
  public void characterConverter()
  {
    CharacterConverter converter = new CharacterConverter();

    assertNull(converter.convertToObject("", Locale.US));
    assertEquals("A", converter.convertToString('A', DUTCH_LOCALE));
    assertEquals((Object)'A', converter.convertToObject("A", DUTCH_LOCALE));

    try
    {
      converter.convertToObject("AA", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // this is correct
View Full Code Here

Examples of org.apache.wicket.util.convert.converter.CharacterConverter

  /**
   * Test for character locale conversions.
   */
  public void testCharacterConverter()
  {
    CharacterConverter converter = new CharacterConverter();

    assertNull(converter.convertToObject("", Locale.US));
    assertEquals("A", converter.convertToString('A', DUTCH_LOCALE));
    assertEquals((Object)'A', converter.convertToObject("A", DUTCH_LOCALE));

    try
    {
      converter.convertToObject("AA", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // this is correct
View Full Code Here

Examples of org.apache.wicket.util.convert.converter.CharacterConverter

   * Test for character locale conversions.
   */
  @Test
  public void characterConverter()
  {
    CharacterConverter converter = new CharacterConverter();

    assertNull(converter.convertToObject("", Locale.US));
    assertEquals("A", converter.convertToString('A', DUTCH_LOCALE));
    assertEquals((Object)'A', converter.convertToObject("A", DUTCH_LOCALE));

    try
    {
      converter.convertToObject("AA", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // this is correct
View Full Code Here

Examples of org.modelmapper.internal.converter.CharacterConverter

  static class Dest {
    char value;
  }

  public CharacterConverterTest() {
    super(new CharacterConverter(), Character.class);
  }
View Full Code Here

Examples of org.more.convert.convert.CharacterConverter

     * <code>false</code> if a default value should be used.
     */
    private void registerPrimitives(final boolean throwException) {
        this.register(Boolean.TYPE, throwException ? new BooleanConverter() : new BooleanConverter(Boolean.FALSE));
        this.register(Byte.TYPE, throwException ? new ByteConverter() : new ByteConverter(ConverterBean.ZERO));
        this.register(Character.TYPE, throwException ? new CharacterConverter() : new CharacterConverter(ConverterBean.SPACE));
        this.register(Double.TYPE, throwException ? new DoubleConverter() : new DoubleConverter(ConverterBean.ZERO));
        this.register(Float.TYPE, throwException ? new FloatConverter() : new FloatConverter(ConverterBean.ZERO));
        this.register(Integer.TYPE, throwException ? new IntegerConverter() : new IntegerConverter(ConverterBean.ZERO));
        this.register(Long.TYPE, throwException ? new LongConverter() : new LongConverter(ConverterBean.ZERO));
        this.register(Short.TYPE, throwException ? new ShortConverter() : new ShortConverter(ConverterBean.ZERO));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.