@Test public void floatからFloat変換() { float[] suspect = null; assertThat(Primitives.wrap(suspect), nullValue()); suspect = new float[] {}; assertThat(Primitives.wrap(suspect).length, is(0)); suspect = new float[] { 255.255f }; assertThat(Primitives.wrap(suspect).length, is(1)); assertThat(Primitives.wrap(suspect)[0], isA(Float.class)); assertThat(Primitives.wrap(suspect)[0].floatValue(), is(255.255f)); }
public static Character[] wrap(final char[] primitives) { if (primitives == null) return null; if (primitives.length == 0) return new Character[0]; return Arrays.gen(primitives.length, new GenCall<Character>() { public Character gen(int index, int size) { return new Character(primitives[index]); } }); }
Primitives { public static Character[] wrap(final char[] primitives) { if (primitives == null) return null; if (primitives.length == 0) return new Character[0]; return Arrays.gen(primitives.length, new GenCall<Character>() { public Character gen(int index, int size) { return new Character(primitives[index]); } }); } }
Primitives { public static Character[] wrap(final char[] primitives) { if (primitives == null) return null; if (primitives.length == 0) return new Character[0]; return Arrays.gen(primitives.length, new GenCall<Character>() { public Character gen(int index, int size) { return new Character(primitives[index]); } }); } private  Primitives(); }
Primitives { public static Character[] wrap(final char[] primitives) { if (primitives == null) return null; if (primitives.length == 0) return new Character[0]; return Arrays.gen(primitives.length, new GenCall<Character>() { public Character gen(int index, int size) { return new Character(primitives[index]); } }); } private  Primitives(); static Character[] wrap(final char[] primitives); static Integer[] wrap(final int[] primitives); static Float[] wrap(final float[] primitives); static Double[] wrap(final double[] primitives); static Byte[] wrap(final byte[] primitives); static Long[] wrap(final long[] primitives); }
Primitives { public static Character[] wrap(final char[] primitives) { if (primitives == null) return null; if (primitives.length == 0) return new Character[0]; return Arrays.gen(primitives.length, new GenCall<Character>() { public Character gen(int index, int size) { return new Character(primitives[index]); } }); } private  Primitives(); static Character[] wrap(final char[] primitives); static Integer[] wrap(final int[] primitives); static Float[] wrap(final float[] primitives); static Double[] wrap(final double[] primitives); static Byte[] wrap(final byte[] primitives); static Long[] wrap(final long[] primitives);  }