Package htsjdk.tribble.annotation
Enum Strand
- java.lang.Object
-
- java.lang.Enum<Strand>
-
- htsjdk.tribble.annotation.Strand
-
- All Implemented Interfaces:
Serializable
,Comparable<Strand>
public enum Strand extends Enum<Strand>
Enum for strand, which can be encoded as a string
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Strand
decode(char ch)
Returns theStrand
that achar
value represents.static Strand
decode(String encoding)
String
encode()
Returns a string representation of thisStrand
char
encodeAsChar()
Returns a single char encoding of thisStrand
.static Strand
toStrand(String encoding)
Deprecated.please usedecode(char)
instead.String
toString()
static Strand
valueOf(String name)
Returns the enum constant of this type with the specified name.static Strand[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
POSITIVE
public static final Strand POSITIVE
Represents the positive or forward strand.
-
NEGATIVE
public static final Strand NEGATIVE
Represents the negative or reverse strand.
-
NONE
public static final Strand NONE
Denotes that a strand designation is not applicable or is unknown.
-
-
Method Detail
-
values
public static Strand[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Strand c : Strand.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Strand valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toStrand
@Deprecated public static Strand toStrand(String encoding)
Deprecated.please usedecode(char)
instead.provide a way to take an encoding string, and produce a Strand- Parameters:
encoding
- the encoding string- Returns:
- a Strand object, if an appropriate one cannot be located an IllegalArg exception
-
decode
public static Strand decode(char ch)
Returns theStrand
that achar
value represents.- Parameters:
ch
- the char encoding for a Strand.- Returns:
- never
null
, a value so thatdecode(c).encodeAsChar() == c
orNONE
if the encoding char is not recognized.
-
decode
public static Strand decode(String encoding)
- Parameters:
encoding
- the strand string representation.- Returns:
- never
null
, a value so thatdecode(s).encode().equals(s)
, orNONE
if the encoding string is not recognized.
-
encode
public String encode()
Returns a string representation of thisStrand
- Returns:
- never
null
, a value so thatdecode(encode(X)) == X
.
-
encodeAsChar
public char encodeAsChar()
Returns a single char encoding of thisStrand
.- Returns:
- a value so that
decode(encodeAsChar(X)) == X
.
-
-