Java AbstractMap Usage splitQueryParam( String param)

Here you can find the source of splitQueryParam( String param)

Description

split Query Param

License

Open Source License

Declaration

public static SimpleImmutableEntry<String, String> splitQueryParam(
              String param) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.AbstractMap.SimpleImmutableEntry;

public class Main {
    public static SimpleImmutableEntry<String, String> splitQueryParam(
            String param) {//w w w .  j  a  v a 2s. com
        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");
    }
}

Related

  1. parseExportedVariable(String exportedVariable)
  2. parseSocketAddress(String address)
  3. parseVariableName(String variableName)
  4. splitByQualifier(String str)
  5. splitIntSuffix(String string)