Performance improvements. Cleanup.

This commit is contained in:
2014-10-19 16:28:56 +02:00
parent 7d6a9faf66
commit c79d2e893f
159 changed files with 424 additions and 670 deletions

View File

@@ -30,7 +30,7 @@ public class StringToolsTest {
*/
@Test
public void testHumaniseCamelCase() {
HashMap<String, String> map = new HashMap<String, String>();
HashMap<String, String> map = new HashMap<>();
map.put("camelCase", "Camel Case");
map.put("Camel Case", "Camel Case");
map.put("thisIsAwesome", "This Is Awesome");
@@ -38,14 +38,13 @@ public class StringToolsTest {
map.put("iLikeABC", "I Like ABC");
String key, value;
Iterator iter = map.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry pairs = (Map.Entry) iter.next();
key = (String) pairs.getKey();
value = (String) pairs.getValue();
String result = StringTools.humaniseCamelCase(key);
assertEquals(value, result);
}
for (Object o : map.entrySet()) {
Map.Entry pairs = (Map.Entry) o;
key = (String) pairs.getKey();
value = (String) pairs.getValue();
String result = StringTools.humaniseCamelCase(key);
assertEquals(value, result);
}
}
/**