/**
	 * Returns an argument map fitting the given value key set (using defined types).
	 * @param arguments input arguments to test arguments against
	 * @return argument map with correct value types
	 */
public Map<SkbShellArgument, Object> getArgMap(SkbShellArgument[] arguments){
		Map<SkbShellArgument, Object> ret = new LinkedHashMap<SkbShellArgument, Object>();
		if(arguments!=null){
			for(Entry<String, String> entry : this.getArgMap().entrySet()){
				for(SkbShellArgument ssa : arguments){
					if(ssa.getKey().equals(entry.getKey())){
						switch(ssa.getType()){
							case Boolean:
								ret.put(ssa, Boolean.valueOf(entry.getValue()));
								break;
							case Double:
								ret.put(ssa, Double.valueOf(entry.getValue()));
								break;
							case Integer:
								ret.put(ssa, Integer.valueOf(entry.getValue()));
								break;
							case String:
								ret.put(ssa, entry.getValue());
								break;
							case ListString:
								String[] ar = StringUtils.split(entry.getValue(), ';');
								if(ar!=null){
									List<String> val = new ArrayList<>();
									for(String s : ar){
										val.add(s);
									}
									ret.put(ssa, val);
								}
								break;
							case ListInteger:
								String[] arInt = StringUtils.split(entry.getValue(), ';');
								if(arInt!=null){
									List<Integer> valInt = new ArrayList<>();
									for(String s : arInt){
										valInt.add(Integer.valueOf(s));
									}
									ret.put(ssa, valInt);
								}
								break;
							default:
								System.err.println("parser.getArgMap --> argument type not yet supported: " + ssa.getType());//TODO do not use syserr prints
								break;
						}
					}
				}
			}
		}
		return ret;
	}
public Map<SkbShellArgument, Object> getArgMap(SkbShellArgument[] arguments){
Map<SkbShellArgument, Object> ret = new LinkedHashMap<SkbShellArgument, Object>();
if(arguments!=null){
for(Entry<String, String> entry : this.getArgMap().entrySet()){
for(SkbShellArgument ssa : arguments){
if(ssa.getKey().equals(entry.getKey())){
switch(ssa.getType()){
case Boolean:
ret.put(ssa, Boolean.valueOf(entry.getValue()));
break;
case Double:
ret.put(ssa, Double.valueOf(entry.getValue()));
break;
case Integer:
ret.put(ssa, Integer.valueOf(entry.getValue()));
break;
case String:
ret.put(ssa, entry.getValue());
break;
case ListString:
String[] ar = StringUtils.split(entry.getValue(), ';');
if(ar!=null){
List<String> val = new ArrayList<>();
for(String s : ar){
val.add(s);
}
ret.put(ssa, val);
}
break;
case ListInteger:
String[] arInt = StringUtils.split(entry.getValue(), ';');
if(arInt!=null){
List<Integer> valInt = new ArrayList<>();
for(String s : arInt){
valInt.add(Integer.valueOf(s));
}
ret.put(ssa, valInt);
}
break;
default:
System.err.println("parser.getArgMap --> argument type not yet supported: " + ssa.getType());//TODO do not use syserr prints
break;
}
}
}
}
}
return ret;
}
public Map<SkbShellArgument, Object> getArgMap(SkbShellArgument[] arguments){
Map<SkbShellArgument, Object> ret = new LinkedHashMap<SkbShellArgument, Object>();
if(arguments!=null){
for(Entry<String, String> entry : this.getArgMap().entrySet()){
for(SkbShellArgument ssa : arguments){
if(ssa.getKey().equals(entry.getKey())){
switch(ssa.getType()){
case Boolean:
ret.put(ssa, Boolean.valueOf(entry.getValue()));
break;
case Double:
ret.put(ssa, Double.valueOf(entry.getValue()));
break;
case Integer:
ret.put(ssa, Integer.valueOf(entry.getValue()));
break;
case String:
ret.put(ssa, entry.getValue());
break;
case ListString:
String[] ar = StringUtils.split(entry.getValue(), ';');
if(ar!=null){
List<String> val = new ArrayList<>();
for(String s : ar){
val.add(s);
}
ret.put(ssa, val);
}
break;
case ListInteger:
String[] arInt = StringUtils.split(entry.getValue(), ';');
if(arInt!=null){
List<Integer> valInt = new ArrayList<>();
for(String s : arInt){
valInt.add(Integer.valueOf(s));
}
ret.put(ssa, valInt);
}
break;
default:
System.err.println("parser.getArgMap --> argument type not yet supported: " + ssa.getType());//TODO do not use syserr prints
break;
}
}
}
}
}
return ret;
}
public Map<SkbShellArgument, Object> getArgMap(SkbShellArgument[] arguments){
Map<SkbShellArgument, Object> ret = new LinkedHashMap<SkbShellArgument, Object>();
if(arguments!=null){
for(Entry<String, String> entry : this.getArgMap().entrySet()){
for(SkbShellArgument ssa : arguments){
if(ssa.getKey().equals(entry.getKey())){
switch(ssa.getType()){
case Boolean:
ret.put(ssa, Boolean.valueOf(entry.getValue()));
break;
case Double:
ret.put(ssa, Double.valueOf(entry.getValue()));
break;
case Integer:
ret.put(ssa, Integer.valueOf(entry.getValue()));
break;
case String:
ret.put(ssa, entry.getValue());
break;
case ListString:
String[] ar = StringUtils.split(entry.getValue(), ';');
if(ar!=null){
List<String> val = new ArrayList<>();
for(String s : ar){
val.add(s);
}
ret.put(ssa, val);
}
break;
case ListInteger:
String[] arInt = StringUtils.split(entry.getValue(), ';');
if(arInt!=null){
List<Integer> valInt = new ArrayList<>();
for(String s : arInt){
valInt.add(Integer.valueOf(s));
}
ret.put(ssa, valInt);
}
break;
default:
System.err.println("parser.getArgMap --> argument type not yet supported: " + ssa.getType());//TODO do not use syserr prints
break;
}
}
}
}
}
return ret;
}