All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.echocat.jsu.Generator Maven / Gradle / Ivy

package org.echocat.jsu;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.function.Supplier;

@FunctionalInterface
public interface Generator {

    @Nullable
    Value generate();

    @FunctionalInterface
    public interface Value extends Supplier {

        @Nonnull
        public static  Value valueOf(@Nullable T value) {
            return () -> value;
        }

        @Nullable
        public static  Value end() {
            return null;
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy