Package com.humaorie.dollar.ArrayWrapper

Examples of com.humaorie.dollar.ArrayWrapper.LongArrayWrapper


        } else if (componentType.equals(Short.class)) {
            return (ArrayWrapper<T>) new ShortArrayWrapper((Short[]) array);
        } else if (componentType.equals(Integer.class)) {
            return (ArrayWrapper<T>) new IntegerArrayWrapper((Integer[]) array);
        } else if (componentType.equals(Long.class)) {
            return (ArrayWrapper<T>) new LongArrayWrapper((Long[]) array);
        } else if (componentType.equals(Character.class)) {
            return (ArrayWrapper<T>) new CharArrayWrapper((Character[]) array);
        } else if (componentType.equals(Boolean.class)) {
            return (ArrayWrapper<T>) new BooleanArrayWrapper((Boolean[]) array);
        } else if (componentType.equals(Float.class)) {
View Full Code Here


    }

    @Test
    public void boxLongArray() {
        long[] unboxed = new long[]{42L, 42L, 42L};
        LongArrayWrapper arrayWrapper = new LongArrayWrapper(unboxed);
        Assert.assertArrayEquals(new Long[]{42L, 42L, 42L}, arrayWrapper.toArray());
    }
View Full Code Here

    @Test
    public void unboxLongArray() {
        final Long[] boxed = {null};
        final long[] unboxed = {0};
        final LongArrayWrapper arrayWrapper = new LongArrayWrapper(boxed);
        Assert.assertArrayEquals(unboxed, arrayWrapper.toLongArray());
    }
View Full Code Here

    @Test
    public void unboxLongArrayWithNulls() {
        final Long[] boxed = {null};
        final long[] unboxed = {0};
        final LongArrayWrapper arrayWrapper = new LongArrayWrapper(boxed);
        Assert.assertArrayEquals(unboxed, arrayWrapper.toLongArray());
    }
View Full Code Here

TOP

Related Classes of com.humaorie.dollar.ArrayWrapper.LongArrayWrapper

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.