Change into function.

@param <T>   the type parameter
@param <R>   the type parameter
@param input the input
@return the function
434803
public static <T, R> Function<T, R> changeInto(R input) {
        return t -> input;
    }
161653
@Override
    public Object map(Object input) {
        if (input instanceof Number) {
            Number number = (Number) input;
            return doOp(number.doubleValue());
        }
        throw new IllegalArgumentException("Input must be a number");
    }
809885
public Operation.Info create( char op , Variable input ) {
        switch( op ) {
            case '\'':
                return Operation.transpose(input, managerTemp);

            default:
                throw new RuntimeException("Unknown operation " + op);
        }
    }
224973
public String processInput(String input) {

        JsonObject object;
        try {
            object = gs.fromJson(input, JsonObject.class);
        } catch (Throwable t) {
            return "{ \"status\" : \"fail\", \"error\" : \"Failed to parse input\" }";
        }

        String command = object.get("command").getAsString();
        JsonObject payload;
        if (!object.has("payload")) {
            payload = new JsonObject();
        } else {
            payload = object.get("payload").getAsJsonObject();
        }

        CommandStatus status;

        try {
            status = dispatch(command, payload);
        } catch (Throwable t) {
            status = new CommandStatus();
            status.fail(t).setPayload(payload);
        }

        return status.toString();
    }
580064
public <T> T parse(String input, Class<T> targetType) {
        return typeParser.parse(input, targetType);
    }
951213
public Object expand(Object input) {
        if (input instanceof List) {
            expandList((List<Object>) input);
            return input;
        } else if (input instanceof Map) {
            expandMap((Map<String, Object>) input);
            return input;
        } else if (input instanceof String) {
            return getJson((String) input);
        } else {
            return input;
        }
    }
742411
public static <T> Function<Optional<T>, T> getFunction() {
    return new Function<Optional<T>, T>() {
      @Override
      public T apply(final Optional<T> input) {
        return input.get();
      }
    };
  }
1352480
@Deprecated
	public void addInput(Operator<IN>... input) {
		this.input = Operator.createUnionCascade(this.input, input);
	}
628665
protected void process(T input) {
        try {
            Optional.ofNullable(this.transformFunction.apply(input))
                    .ifPresent(this.outputPublisher::submit);
        } catch (Exception e) {
            JMExceptionManager.handleException(log, e, "process", input);
        }
    }
551215
public <R> Change<R> map(Function<T, R> fn) {
        return new Change<>(
                fn.apply(getOldValue()),
                fn.apply(getNewValue())
        );
    }
198153
public static String[] nullifyBadInput(String[] input)
    {
        if (input != null)
        {
            if (input.length > 0)
            {
                return input;
            }
        }
        return null;
    }
134527
@SuppressWarnings("unchecked")
    @Override
    public O transform(I input) {
        Object rawOutput = input;

        for (Transformer transformer : transformers) {
            rawOutput = transformer.transform(rawOutput);
        }

        return lastTransformer.transform(rawOutput);
    }
741320
public <S, T> T convertTo(Class<S> input, Class<T> output, Object object) {
		return convertTo(new ConverterKey<S,T>(input, output, DefaultBinding.class), object);
	}
958468
@SneakyThrows
    public static <T> void doIfNotNull(final T input,
                                       final Consumer<T> trueFunction) {
        try {
            if (input != null) {
                trueFunction.accept(input);
            }
        } catch (final Throwable e) {
            LOGGER.warn(e.getMessage(), e);
        }
    }
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));
        }
    }
354080
public Processor setInput(final File input) {
        if (!input.isAbsolute()) {
            throw new IllegalArgumentException("Input file path must be absolute: " + input);
        }
        if (!input.isFile()) {
            throw new IllegalArgumentException("Input file is not a file: " + input);
        }
        setInput(input.toURI());
        return this;
    }
692125
@Deprecated
	public void addFirstInput(Operator<IN1>... input) {
		this.input1 = Operator.createUnionCascade(this.input1, input);
	}