@Test public void testToCharacterObjects() throws Exception { char[] chars = new char[]{'2', '3', 'a'}; Character[] characters = Strings.toObjects(chars); Assert.assertTrue(chars.length == characters.length); for (int i = 0; i < characters.length; i++) { Character character = characters[i]; char ch = chars[i]; Assert.assertTrue(character.equals(ch)); } }
@Nonnull public static Character[] toObjects(char[] array) { if (array == null || array.length == 0) { return EMPTY_CHARACTER_OBJECT_ARRAY; } final Character[] result = new Character[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i]; } return result; }
Strings { @Nonnull public static Character[] toObjects(char[] array) { if (array == null || array.length == 0) { return EMPTY_CHARACTER_OBJECT_ARRAY; } final Character[] result = new Character[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i]; } return result; } }
Strings { @Nonnull public static Character[] toObjects(char[] array) { if (array == null || array.length == 0) { return EMPTY_CHARACTER_OBJECT_ARRAY; } final Character[] result = new Character[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i]; } return result; } protected  Strings(); }
Strings { @Nonnull public static Character[] toObjects(char[] array) { if (array == null || array.length == 0) { return EMPTY_CHARACTER_OBJECT_ARRAY; } final Character[] result = new Character[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i]; } return result; } protected  Strings(); static String[] split(String source, String subString); static String convertStream(InputStream in); static boolean notEmpty(@Nullable String s); static boolean isEmpty(@Nullable CharSequence s); @Nonnull static String getNotEmpty(@Nullable CharSequence s, @Nonnull String defaultValue); @Nonnull static String getNotEmpty(@Nullable T t, @Nonnull String defaultValue); static String[] toString(@Nonnull Enum... enums); @Nonnull static Character[] toObjects(char[] array); @Nonnull static String fromStackTrace(@Nullable StackTraceElement... stackTraceElements); @Nonnull static String repeat(@Nonnull String str, int repeat); @Nonnull static String repeat(char ch, int repeat); @Nonnull static String generateRandomString(int length); @Nonnull static String toHex(@Nonnull String s); @Nonnull static String fromHex(@Nonnull CharSequence hex); @Nonnull static String getAllEnumValues(@Nonnull Class<? extends Enum> enumClass); @Nonnull static String getAllValues(@Nonnull List<?> elements); @Nonnull static String toHtml(@Nonnull CharSequence text); }
Strings { @Nonnull public static Character[] toObjects(char[] array) { if (array == null || array.length == 0) { return EMPTY_CHARACTER_OBJECT_ARRAY; } final Character[] result = new Character[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i]; } return result; } protected  Strings(); static String[] split(String source, String subString); static String convertStream(InputStream in); static boolean notEmpty(@Nullable String s); static boolean isEmpty(@Nullable CharSequence s); @Nonnull static String getNotEmpty(@Nullable CharSequence s, @Nonnull String defaultValue); @Nonnull static String getNotEmpty(@Nullable T t, @Nonnull String defaultValue); static String[] toString(@Nonnull Enum... enums); @Nonnull static Character[] toObjects(char[] array); @Nonnull static String fromStackTrace(@Nullable StackTraceElement... stackTraceElements); @Nonnull static String repeat(@Nonnull String str, int repeat); @Nonnull static String repeat(char ch, int repeat); @Nonnull static String generateRandomString(int length); @Nonnull static String toHex(@Nonnull String s); @Nonnull static String fromHex(@Nonnull CharSequence hex); @Nonnull static String getAllEnumValues(@Nonnull Class<? extends Enum> enumClass); @Nonnull static String getAllValues(@Nonnull List<?> elements); @Nonnull static String toHtml(@Nonnull CharSequence text); static final String LINE_SEPARATOR; static final Character[] EMPTY_CHARACTER_OBJECT_ARRAY; }