public static Map<String,Set<String>> parse(CommandManager mgr,List listAttributeValues) throws CLIException {
  Map<String,Set<String>> attrValues=new HashMap<>();
  if ((listAttributeValues != null) && !listAttributeValues.isEmpty()) {
    for (Iterator i=listAttributeValues.iterator(); i.hasNext(); ) {
      String s=(String)i.next();
      boolean retry=true;
      int idx=0;
      while (retry) {
        idx=s.indexOf('=',idx + 1);
        if (idx == -1) {
          throw createIncorrectFormatException(mgr,s);
        }
        retry=(s.charAt(idx - 1) == '\\');
      }
      String attrName=s.substring(0,idx);
      String attrValue=s.substring(idx + 1);
      if (!attrName.startsWith("#")) {
        attrName=attrName.trim();
        attrValue=attrValue.trim();
        attrName=stripEscapeChars(attrName);
        Set<String> set=attrValues.get(attrName);
        if (set == null) {
          set=new HashSet<>();
          attrValues.put(attrName,set);
        }
        set.add(attrValue);
      }
    }
  }
  return attrValues;
}

public static Map < String , Set < String > > parse ( CommandManager mgr , List listAttributeValues ) throws CLIException { Map < String , Set < String > > attrValues = new HashMap < > ( ) ; if ( ( listAttributeValues != null ) && ! listAttributeValues . isEmpty ( ) ) { for ( Iterator i = listAttributeValues . iterator ( ) ; i . hasNext ( ) ; ) { String s = ( String ) i . next ( ) ; boolean retry = true ; int idx = 0 ; while ( retry ) { idx = s . indexOf ( '=' , idx + 1 ) ; if ( idx == - 1 ) { throw createIncorrectFormatException ( mgr , s ) ; } retry = ( s . charAt ( idx - 1 ) == '\\' ) ; } String attrName = s . substring ( 0 , idx ) ; String attrValue = s . substring ( idx + 1 ) ; if ( ! attrName . startsWith ( "#" ) ) { attrName = attrName . trim ( ) ; attrValue = attrValue . trim ( ) ; attrName = stripEscapeChars ( attrName ) ; Set < String > set = attrValues . get ( attrName ) ; if ( set == null ) { set = new HashSet < > ( ) ; attrValues . put ( attrName , set ) ; } set . add ( attrValue ) ; } } } return attrValues ; }
returns a map of attribute name to set of values .
