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

dev.marksman.composablerandom.primitives.NextBooleanImpl Maven / Gradle / Ivy

package dev.marksman.composablerandom.primitives;

import dev.marksman.composablerandom.CompiledGenerator;
import dev.marksman.composablerandom.RandomState;
import dev.marksman.composablerandom.Result;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;

@AllArgsConstructor(access = AccessLevel.PRIVATE)
public class NextBooleanImpl implements CompiledGenerator {
    private static NextBooleanImpl INSTANCE = new NextBooleanImpl();

    @Override
    public Result run(RandomState input) {
        return input.nextBoolean();
    }

    public static NextBooleanImpl nextBooleanImpl() {
        return INSTANCE;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy