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

de.charite.compbio.jannovar.hgvs.bridge.ResultWithWarnings Maven / Gradle / Ivy

There is a newer version: 0.41
Show newest version
package de.charite.compbio.jannovar.hgvs.bridge;

import java.util.Collection;

import com.google.common.collect.ImmutableList;

/**
 * Helper class that allows annotating a result type with warning messages.
 *
 * @author Manuel Holtgrewe
 */
class ResultWithWarnings {

	/** wrapped value */
	private final Value value;
	/** list of warning messages */
	private final ImmutableList warnings;

	public static  ResultWithWarnings construct(Value value) {
		return new ResultWithWarnings(value, ImmutableList. of());
	}

	public static  ResultWithWarnings construct(Value value, String... warnings) {
		return new ResultWithWarnings(value, ImmutableList.copyOf(warnings));
	}

	public ResultWithWarnings(Value value, Collection warnings) {
		super();
		this.value = value;
		this.warnings = ImmutableList.copyOf(warnings);
	}

	public ImmutableList getWarnings() {
		return warnings;
	}

	public Value getValue() {
		return value;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy