Package jodd.typeconverter.impl

Examples of jodd.typeconverter.impl.IntegerArrayConverter


    register(Character.class, characterConverter);
    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 IntegerArrayConverterTest {

  @Test
  public void testConversion() {
    IntegerArrayConverter integerArrayConverter = (IntegerArrayConverter) TypeConverterManager.lookup(int[].class);

    assertNull(integerArrayConverter.convert(null));

    assertEq(arri(173, 234), integerArrayConverter.convert("173, 234"));
    assertEq(arri(173), integerArrayConverter.convert(Double.valueOf(173)));
    assertEq(arri(1, 7, 3), integerArrayConverter.convert(arri(1, 7, 3)));
    assertEq(arri(1, 7, 3), integerArrayConverter.convert(arrl(1, 7, 3)));
    assertEq(arri(1, 7, 3), integerArrayConverter.convert(arrf(1, 7, 3)));
    assertEq(arri(1, 7, 3), integerArrayConverter.convert(arrd(1.1, 7.99, 3)));
    assertEq(arri(173, 1022), integerArrayConverter.convert(arrs("173", "1022")));
    assertEq(arri(173, 10), integerArrayConverter.convert(arro("173", Integer.valueOf(10))));

    assertEq(arri(111, 777, 333), integerArrayConverter.convert(arrs("111", "   777     ", "333")));
    assertEq(arri(111, 777, 333), integerArrayConverter.convert("111,  777,  333"));

  }
View Full Code Here

    register(Character.class, characterConverter);
    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

TOP

Related Classes of jodd.typeconverter.impl.IntegerArrayConverter

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.