@Test public void getCamelCaseBig() { assertEquals("", BapiFormatHelper.getCamelCaseBig(null)); assertEquals("", BapiFormatHelper.getCamelCaseBig("")); assertEquals("X", BapiFormatHelper.getCamelCaseBig("X")); assertEquals("XY", BapiFormatHelper.getCamelCaseBig("X_Y")); assertEquals("XaYbZc", BapiFormatHelper.getCamelCaseBig("xa_yb_zc")); assertEquals("MyLittleClass", BapiFormatHelper.getCamelCaseBig("MY_LITTLE_CLASS")); assertEquals("MyLittleClass", BapiFormatHelper.getCamelCaseBig("_MY_LITTLE_CLASS_")); }
public static String getCamelCaseBig(final String sapName) { StringBuilder result = new StringBuilder(); if (sapName == null) { return result.toString(); } String[] parts = sapName.split("_"); for (String part : parts) { if (part.length() > 0) { result.append(part.substring(0, 1).toUpperCase()); result.append(part.substring(1).toLowerCase()); } } return result.toString(); }
BapiFormatHelper { public static String getCamelCaseBig(final String sapName) { StringBuilder result = new StringBuilder(); if (sapName == null) { return result.toString(); } String[] parts = sapName.split("_"); for (String part : parts) { if (part.length() > 0) { result.append(part.substring(0, 1).toUpperCase()); result.append(part.substring(1).toLowerCase()); } } return result.toString(); } }
BapiFormatHelper { public static String getCamelCaseBig(final String sapName) { StringBuilder result = new StringBuilder(); if (sapName == null) { return result.toString(); } String[] parts = sapName.split("_"); for (String part : parts) { if (part.length() > 0) { result.append(part.substring(0, 1).toUpperCase()); result.append(part.substring(1).toLowerCase()); } } return result.toString(); } private  BapiFormatHelper(); }
BapiFormatHelper { public static String getCamelCaseBig(final String sapName) { StringBuilder result = new StringBuilder(); if (sapName == null) { return result.toString(); } String[] parts = sapName.split("_"); for (String part : parts) { if (part.length() > 0) { result.append(part.substring(0, 1).toUpperCase()); result.append(part.substring(1).toLowerCase()); } } return result.toString(); } private  BapiFormatHelper(); static String getCamelCaseSmall(final String sapName); static String getCamelCaseBig(final String sapName); }
BapiFormatHelper { public static String getCamelCaseBig(final String sapName) { StringBuilder result = new StringBuilder(); if (sapName == null) { return result.toString(); } String[] parts = sapName.split("_"); for (String part : parts) { if (part.length() > 0) { result.append(part.substring(0, 1).toUpperCase()); result.append(part.substring(1).toLowerCase()); } } return result.toString(); } private  BapiFormatHelper(); static String getCamelCaseSmall(final String sapName); static String getCamelCaseBig(final String sapName);  }