de.charite.compbio.jannovar.hgvs.bridge.ResultWithWarnings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jannovar-htsjdk Show documentation
Show all versions of jannovar-htsjdk Show documentation
jannovar-htsjdk is the module for bridging between Jannovar and HTSJDK
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