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

org.broadinstitute.hellbender.utils.mcmc.Parameter Maven / Gradle / Ivy

The newest version!
package org.broadinstitute.hellbender.utils.mcmc;

import org.broadinstitute.hellbender.utils.Utils;

/**
 * Represents a parameter value with a named {@link ParameterEnum} key.
 * @param    type of the {@link ParameterEnum} key name
 * @param    type of the value
 *
 * @author Samuel Lee <[email protected]>
 */
public final class Parameter & ParameterEnum, U> {
    private final T name;
    private final U value;

    /**
     * Constructs a {@link Parameter} given a {@link ParameterEnum} key name and value.
     * @param name  parameter key name
     * @param value parameter value
     * @throws IllegalArgumentException if {@code name} or {@code value} is null
     */
    public Parameter(final T name, final U value) {
        this.name = Utils.nonNull(name, "The parameter name cannot be null.");
        this.value = Utils.nonNull(value, "The parameter value cannot be null.");
    }

    public T getName() {
        return name;
    }

    public U getValue() {
        return value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy