Java Utililty Methods AbstractMap Usage

List of utility methods to do AbstractMap Usage

Description

The list of methods to do AbstractMap Usage are organized into topic(s).

Method

EntrysplitIntSuffix(String string)
split Int Suffix
for (int i = 0; i < string.length(); i++) {
    try {
        int suffix = Integer.parseInt(string.substring(i));
        return new AbstractMap.SimpleEntry<String, Integer>(string.substring(0, i), suffix);
    } catch (NumberFormatException e) {
return null;
...
SimpleImmutableEntrysplitQueryParam(String param)
split Query Param
String[] keyVal = param.split("=");
if (keyVal.length == 1)
    return new SimpleImmutableEntry<String, String>(keyVal[1], null);
if (keyVal.length > 1)
    return new SimpleImmutableEntry<String, String>(keyVal[0], keyVal[1]);
throw new IllegalArgumentException("The param doesn't contain any value");