MCPcopy Create free account
hub / github.com/RealTimeGenomics/rtg-tools / valueOf

Method valueOf

src/main/java/com/rtg/mode/DNA.java:172–177  ·  view source on GitHub ↗

Mimics the valueOf in an enumeration. @param str to be converted. @return corresponding value. @throws IllegalArgumentException if string doesn't correspond to a value.

(final String str)

Source from the content-addressed store, hash-verified

170 * @throws IllegalArgumentException if string doesn't correspond to a value.
171 */
172 public static DNA valueOf(final String str) {
173 if (str.length() != 1) {
174 throw new IllegalArgumentException();
175 }
176 return valueOf(str.charAt(0));
177 }
178
179 /**
180 * Mimics the <code>valueOf</code> in an enumeration.

Callers 15

testMethod · 0.95
testIsUnknownMethod · 0.95
testReverseStrandMethod · 0.95
checkBasicMethod · 0.95
checkBasicPairedMethod · 0.95
getDNAMethod · 0.95
getPriorDistrMethod · 0.95
readFirstLineAsLongMethod · 0.45
addHeaderMethod · 0.45
addColumnLabelsTopMethod · 0.45
transferMethod · 0.45
writeSequenceMethod · 0.45

Calls 1

lengthMethod · 0.65

Tested by 5

testMethod · 0.76
testIsUnknownMethod · 0.76
testReverseStrandMethod · 0.76
checkBasicMethod · 0.76
checkBasicPairedMethod · 0.76