/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Returns a function that ignores its input and always returns {@code value}. * * <p><b>Java 8 users:</b> use the lambda expression {@code o -> value} instead. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@NullableDecl E value) { return new ConstantFunction<E>(value); }
/** * Creates a function that returns {@code value} for any input. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Returns a function that ignores its input and always returns {@code value}. * * <p><b>Java 8 users:</b> use the lambda expression {@code o -> value} instead. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }
/** * Returns a function that ignores its input and always returns {@code value}. * * <p><b>Java 8 users:</b> use the lambda expression {@code o -> value} instead. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@NullableDecl E value) { return new ConstantFunction<E>(value); }
/** * Returns a function that ignores its input and always returns {@code value}. * * <p><b>Java 8 users:</b> use the lambda expression {@code o -> value} instead. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@NullableDecl E value) { return new ConstantFunction<E>(value); }
/** * Returns a function that ignores its input and always returns {@code value}. * * <p><b>Java 8 users:</b> use the lambda expression {@code o -> value} instead. * * @param value the constant value for the function to return * @return a function that always returns {@code value} */ public static <E> Function<Object, E> constant(@Nullable E value) { return new ConstantFunction<E>(value); }