@Test public void camelCaseToHumanReadable() { Assert.assertEquals("First Name", SharedUtil.camelCaseToHumanFriendly("firstName")); Assert.assertEquals("First Name", SharedUtil.camelCaseToHumanFriendly("first name")); Assert.assertEquals("First Name2", SharedUtil.camelCaseToHumanFriendly("firstName2")); Assert.assertEquals("First", SharedUtil.camelCaseToHumanFriendly("first")); Assert.assertEquals("First", SharedUtil.camelCaseToHumanFriendly("First")); Assert.assertEquals("Some XYZ Abbreviation", SharedUtil.camelCaseToHumanFriendly("SomeXYZAbbreviation")); Assert.assertEquals("My Bean Container", SharedUtil.camelCaseToHumanFriendly("MyBeanContainer")); Assert.assertEquals("Awesome URL Factory", SharedUtil.camelCaseToHumanFriendly("AwesomeURLFactory")); Assert.assertEquals("Some Uri Action", SharedUtil.camelCaseToHumanFriendly("SomeUriAction")); }
public static String camelCaseToHumanFriendly(String camelCaseString) { String[] parts = splitCamelCase(camelCaseString); for (int i = 0; i < parts.length; i++) { parts[i] = capitalize(parts[i]); } return join(parts, " "); }
SharedUtil implements Serializable { public static String camelCaseToHumanFriendly(String camelCaseString) { String[] parts = splitCamelCase(camelCaseString); for (int i = 0; i < parts.length; i++) { parts[i] = capitalize(parts[i]); } return join(parts, " "); } }
SharedUtil implements Serializable { public static String camelCaseToHumanFriendly(String camelCaseString) { String[] parts = splitCamelCase(camelCaseString); for (int i = 0; i < parts.length; i++) { parts[i] = capitalize(parts[i]); } return join(parts, " "); }  }
SharedUtil implements Serializable { public static String camelCaseToHumanFriendly(String camelCaseString) { String[] parts = splitCamelCase(camelCaseString); for (int i = 0; i < parts.length; i++) { parts[i] = capitalize(parts[i]); } return join(parts, " "); }  static boolean equals(Object o1, Object o2); static String trimTrailingSlashes(String value); static String[] splitCamelCase(String camelCaseString); static String camelCaseToHumanFriendly(String camelCaseString); static String join(String[] parts, String separator); static String capitalize(String string); static String propertyIdToHumanFriendly(Object propertyId); static String addGetParameters(String uri, String extraParams); static String dashSeparatedToCamelCase(String dashSeparated); }
SharedUtil implements Serializable { public static String camelCaseToHumanFriendly(String camelCaseString) { String[] parts = splitCamelCase(camelCaseString); for (int i = 0; i < parts.length; i++) { parts[i] = capitalize(parts[i]); } return join(parts, " "); }  static boolean equals(Object o1, Object o2); static String trimTrailingSlashes(String value); static String[] splitCamelCase(String camelCaseString); static String camelCaseToHumanFriendly(String camelCaseString); static String join(String[] parts, String separator); static String capitalize(String string); static String propertyIdToHumanFriendly(Object propertyId); static String addGetParameters(String uri, String extraParams); static String dashSeparatedToCamelCase(String dashSeparated); static final String SIZE_PATTERN; }