com.g2forge.alexandria.java.function.ISupplier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ax-java Show documentation
Show all versions of ax-java Show documentation
Standard Java library and the basis of the ${alexandria.name} project.
package com.g2forge.alexandria.java.function;
import java.util.function.Supplier;
@FunctionalInterface
public interface ISupplier extends Supplier {
public static ISupplier create(ISupplier supplier) {
return supplier;
}
public static ISupplier create(T value) {
return new LiteralSupplier<>(value);
}
public default IFunction1 toFunction() {
return t -> get();
}
}