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

com.pholser.junit.quickcheck.internal.SeededValue Maven / Gradle / Ivy

There is a newer version: 1.0
Show newest version
package com.pholser.junit.quickcheck.internal;

import com.pholser.junit.quickcheck.internal.generator.PropertyParameterGenerationContext;

public final class SeededValue {
    private final PropertyParameterGenerationContext p;
    private final Object value;
    private final long seed;

    public SeededValue(PropertyParameterGenerationContext p) {
        this.p = p;
        this.value = p.generate();
        this.seed = p.effectiveSeed();
    }

    public PropertyParameterGenerationContext parameter() {
        return p;
    }

    public Object value() {
        return value;
    }

    public long seed() {
        return seed;
    }

    @Override public String toString() {
        return String.format(
            "%s = [%s], seed = %d",
            p.name(),
            String.valueOf(value),
            seed);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy