Examples of LongConverter


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

  /**
   * Test long conversions.
   */
  public void testLongConversions()
  {
    LongConverter converter = new LongConverter();
    assertEquals(new Long(10), converter.convertToObject("10", Locale.US));
    assertEquals("10", converter.convertToString((long)10, Locale.US));
    try
    {
      converter.convertToObject("whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
    }
    try
    {
      converter.convertToObject("10whatever", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
    }
    try
    {
      converter.convertToObject("" + Long.MAX_VALUE + "0", Locale.US);
      fail("Conversion should have thrown an exception");
    }
    catch (ConversionException e)
    {
      // This is correct
View Full Code Here

Examples of org.codehaus.plexus.component.configurator.converters.basic.LongConverter

        registerDefaultConverter( new FloatConverter() );

        registerDefaultConverter( new IntConverter() );

        registerDefaultConverter( new LongConverter() );

        registerDefaultConverter( new ShortConverter() );

        registerDefaultConverter( new StringBufferConverter() );
View Full Code Here

Examples of org.codehaus.plexus.component.configurator.converters.basic.LongConverter

        registerDefaultConverter( new FloatConverter() );

        registerDefaultConverter( new IntConverter() );

        registerDefaultConverter( new LongConverter() );

        registerDefaultConverter( new ShortConverter() );

        registerDefaultConverter( new StringBufferConverter() );
View Full Code Here

Examples of org.dmrad.view.util.type.LongConverter

      } else if (propertyClass == Long.class) {
        textField = new TextField("propertyValue", new PropertyModel(
            entity, propertyCode, propertyClass)) {
          static final long serialVersionUID = 200912L;
          public IConverter getConverter() {
            return new LongConverter();
          }
        };
        textField.setType(Long.class);
      } else if (propertyClass == Float.class) {
        textField = new TextField("propertyValue", new PropertyModel(
View Full Code Here

Examples of org.more.convert.convert.LongConverter

        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

Examples of org.projectforge.xml.stream.converter.LongConverter

    internalRegisterConverter(Double.class, conv);
    internalRegisterConverter(double.class, conv);
    conv = new IntConverter();
    internalRegisterConverter(Integer.class, conv);
    internalRegisterConverter(int.class, conv);
    conv = new LongConverter();
    internalRegisterConverter(Long.class, conv);
    internalRegisterConverter(long.class, conv);
    conv = new ShortConverter();
    internalRegisterConverter(Short.class, conv);
    internalRegisterConverter(short.class, conv);
View Full Code Here

Examples of org.soybeanMilk.core.bean.converters.LongConverter

    addConverter(String.class, Byte.class, new ByteConverter());
    addConverter(String.class, Character.class, new CharacterConverter());
    addConverter(String.class, Double.class, new DoubleConverter());
    addConverter(String.class, Float.class, new FloatConverter());
    addConverter(String.class, Integer.class, new IntegerConverter());
    addConverter(String.class, Long.class, new LongConverter());
    addConverter(String.class, Short.class, new ShortConverter());
   
    //其他
    addConverter(String.class, java.math.BigDecimal.class, new BigDecimalConverter());
    addConverter(String.class, java.math.BigInteger.class, new BigIntegerConverter());
View Full Code Here

Examples of org.springframework.shell.converters.LongConverter

    return new LocaleConverter();
  }

  @Bean
  Converter longConverter() {
    return new LongConverter();
  }
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.