Creates an array of {@link InputMapping}s based on an array of arguments.
Uses {@link ElementUtil#createInputMapping(Object)} for every argument.
161811
public static InputMapping<?>[] createArrayMapping( Object[] arguments ){
        if( arguments == null || arguments.length == 0 ){
            return null;
        }
        List<InputMapping<?>> list = new ArrayList<>();
        for( Object argument : arguments ){
            list.add( createInputMapping( argument ) );
        }
        return list.toArray( new InputMapping<?>[arguments.length] );

    }
56831
public static <K, V> MultiValueMap<K, V> toMultiValueMap(Map<K, List<V>> map) {
		return new MultiValueMapAdapter<K, V>(map);

	}
715657
@Override
    public Object map(Object input) {
        return new Text(map.get(input.toString()));
    }
477413
public void setInput(INDArray input) {
        this.input = input;
        if (this.layers == null) {
            init();
        }
        if (input != null) {
            if (input.length() == 0)
                throw new IllegalArgumentException(
                        "Invalid input: length 0 (shape: " + Arrays.toString(input.shape()) + ")");

            // FIXME: int cast
            setInputMiniBatchSize((int) input.size(0));
        }
    }
690204
public static String[] getArgsTypeNameArray(Class<?>[] argsTypes) {
        String[] argsTypeArray = null;
        if (argsTypes != null) {
            argsTypeArray = new String[argsTypes.length];
            for (int i = 0; i < argsTypes.length; i++) {
                argsTypeArray[i] = argsTypes[i].getName();
            }
        }
        return argsTypeArray;
    }
111624
@Export
	public Map createMap(String applicationId, String mapId, String elementId) {
		Map map = getMap(applicationId, mapId);
		if (map == null) {
			MapWidget mapWidget = new MapWidget(mapId, applicationId);
			map = new MapImpl(mapWidget);
			Element element = DOM.getElementById(elementId);
			if (element != null) {
				int width = element.getClientWidth();
				int height = element.getClientHeight();
				map.setSize(width, height);
				map.setHtmlElementId(elementId);
			}
			registerMap(mapId, applicationId, map);
		} else {
			((MapImpl) map).getMapWidget().redraw();
		}
		return map;
	}
270880
public static OutputMapping createOutputMapping( Element outputElement ){
        if( outputElement == null ){
            return null;
        }
        switch( outputElement.getType() ) {
            case VARIABLE:
                return new ValueMapping( outputElement.getString( 0 ) );
            case VARIABLES:
                Map<String, String> mappings = new LinkedHashMap<>();
                for( String mapping : outputElement.getStringArray( 0 ) ){
                    String[] pair = mapping.split( "=" );
                    mappings.put( pair[1], pair[0] );
                }
                return new MapEntryMapping( mappings );
            default :
                throw new IllegalStateException( "No strategy defined for creating an OutputMapping based on: " + outputElement );
        }
    }
871132
public static Map<String, String> arrayToMap(String[] args) {
    if (args.length % 2 != 0) {
      throw new IllegalArgumentException("Must pass in an even number of args, one key per value.");
    }

    Map<String, String> ret = new HashMap<>();

    for (int i = 0; i < args.length; i += 2) {
      ret.put(args[i], args[i + 1]);
    }

    return ret;
  }
391784
public static <S, T extends Event> InputMapTemplate<S, T> unless(
            Predicate<? super S> condition, InputMapTemplate<S, T> imt) {
        return when(condition.negate(), imt);
    }
349337
public <Z> Type map(TypeMapping<Z> mapping, Z arg) {
        return mapping.visit(this, arg);
    }
715426
public CreateDevEndpointRequest withArguments(java.util.Map<String, String> arguments) {
        setArguments(arguments);
        return this;
    }
72687
@Override
	public OUTPUT newInstance(INPUT input, INPUT... inputs) throws FAILURE {
		
		StringBuilder builder = new StringBuilder()
		.append(getClass().getName())
		.append(".newInstance(Input, Input...) is unsupported.");
		
		throw new UnsupportedOperationException(builder.toString());
	}
1303224
private Map<? extends String, ? extends Parameter> buildConstParamMap() {
		Map<String, Parameter> paramMap = new HashMap<>();
		for (String className : constantClassNames) {
			if (StringUtils.isNotBlank(className)) {
				try {
					Class<?> targetClass = Class.forName(className, true, Thread.currentThread()
							.getContextClassLoader());
					makeConstParamMap(paramMap, targetClass);
				} catch (ClassNotFoundException ex) {
					LOG.error(ex.getMessage(), ex);
				}
			}
		}
		return paramMap;
	}
54129
public Map<String, String> getArgMap(){
		Map<String, String> ret = new LinkedHashMap<String, String>();
		String[] ar = StringUtils.split(this.getArgs(), ',');
		if(ar!=null){
			for(String s : ar){
				String[] kv = StringUtils.split(s, ":", 2);
				if(kv!=null && kv.length==2){
					ret.put(StringUtils.trim(kv[0]), StringUtils.trim(kv[1]));
				}
				else{
					//TODO error log?
				}
			}
		}
		return ret;
	}
278967
public static ArgumentListExpression createArgumentListFromParameters(Parameter[] parameterTypes, boolean thisAsFirstArgument, Map<String, ClassNode> genericsPlaceholders) {
        ArgumentListExpression arguments = new ArgumentListExpression();

        if (thisAsFirstArgument) {
            arguments.addExpression(new VariableExpression("this"));
        }

        for (Parameter parameterType : parameterTypes) {
            arguments.addExpression(new VariableExpression(parameterType.getName(), replaceGenericsPlaceholders(parameterType.getType(), genericsPlaceholders)));
        }
        return arguments;
    }
1210845
public static Map<Integer, List<AnnotationInstance>> createParameterAnnotationMap(final MethodInfo method) {
        final Map<Integer, List<AnnotationInstance>> result = new HashMap<>();
        for (AnnotationInstance ai : method.annotations()) {
            final AnnotationTarget at = ai.target();
            if (at.kind() == AnnotationTarget.Kind.METHOD_PARAMETER) {
                final MethodParameterInfo mp = at.asMethodParameter();
                final int pos = (int) mp.position();
                List<AnnotationInstance> list = result.get(pos);
                if (list == null) {
                    list = new ArrayList<>();
                    result.put(pos, list);
                }
                list.add(ai);
            }
        }
        return result;
    }
431508
public static SkbShellArgument[] newArgumentArray(SkbShellArgument ... args){
		if(args==null){
			return null;
		}
		Set<SkbShellArgument> ret = new HashSet<>();
		for(SkbShellArgument arg : args){
			if(arg!=null){
				ret.add(arg);
			}
		}
		return ret.toArray(new SkbShellArgument[args.length]);
	}