Package jodd.typeconverter.impl

Examples of jodd.typeconverter.impl.LongArrayConverter


    register(char.class, characterConverter);

    register(byte[].class, new ByteArrayConverter(this));
    register(short[].class, new ShortArrayConverter(this));
    register(int[].class, new IntegerArrayConverter(this));
    register(long[].class, new LongArrayConverter(this));
    register(float[].class, new FloatArrayConverter(this));
    register(double[].class, new DoubleArrayConverter(this));
    register(boolean[].class, new BooleanArrayConverter(this));
    register(char[].class, new CharacterArrayConverter(this));
View Full Code Here


    register(char.class, characterConverter);

    register(byte[].class, new ByteArrayConverter(this));
    register(short[].class, new ShortArrayConverter(this));
    register(int[].class, new IntegerArrayConverter(this));
    register(long[].class, new LongArrayConverter(this));
    register(float[].class, new FloatArrayConverter(this));
    register(double[].class, new DoubleArrayConverter(this));
    register(boolean[].class, new BooleanArrayConverter(this));
    register(char[].class, new CharacterArrayConverter(this));
View Full Code Here

public class LongArrayConverterTest {

  @Test
  public void testConversion() {
    LongArrayConverter longArrayConverter = (LongArrayConverter) TypeConverterManager.lookup(long[].class);

    assertNull(longArrayConverter.convert(null));

    assertEq(arrl(173), longArrayConverter.convert(Double.valueOf(173)));
    assertEq(arrl(173, 1022, 29929), longArrayConverter.convert(arrf(173, 1022, 29929)));
    assertEq(arrl(173, 1022, 29929), longArrayConverter.convert(arrd(173, 1022, 29929)));
    assertEq(arrl(173, 1022, 29929), longArrayConverter.convert(arri(173, 1022, 29929)));
    assertEq(arrl(173, 1022, 29929), longArrayConverter.convert(arrl(173, 1022, 29929)));
    assertEq(arrl(173, 1022), longArrayConverter.convert(arrs("173", "1022")));
    assertEq(arrl(173, 1022), longArrayConverter.convert(arro("173", Long.valueOf(1022))));

    assertEq(arrl(111, 777, 333), longArrayConverter.convert(arrs("111", "   777     ", "333")));
    assertEq(arrl(111, 777, 333), longArrayConverter.convert("111,  777,  333"));
  }
View Full Code Here

TOP

Related Classes of jodd.typeconverter.impl.LongArrayConverter

Copyright © 2018 www.massapicom. 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.