Enum Class Strand

java.lang.Object
java.lang.Enum<Strand>
htsjdk.tribble.annotation.Strand
All Implemented Interfaces:
Serializable, Comparable<Strand>, Constable

public enum Strand extends Enum<Strand>
Enum for strand, which can be encoded as a string
  • Enum Constant Details

    • 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.
  • Field Details

    • FORWARD

      public static final Strand FORWARD
      Common alias for the POSITIVE strand.
    • REVERSE

      public static final Strand REVERSE
      Common alias for the NEGATIVE strand.
  • Method Details

    • values

      public static Strand[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Strand valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • toStrand

      @Deprecated public static Strand toStrand(String encoding)
      Deprecated.
      please use decode(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 the Strand that a char value represents.
      Parameters:
      ch - the char encoding for a Strand.
      Returns:
      never null, a value so that decode(c).encodeAsChar() == c or NONE if the encoding char is not recognized.
    • decode

      public static Strand decode(String encoding)
      Returns the Strand that a String encodes for.
      Parameters:
      encoding - the strand string representation.
      Returns:
      never null, a value so that decode(s).encode().equals(s), or NONE if the encoding string is not recognized.
    • encode

      public String encode()
      Returns a string representation of this Strand
      Returns:
      never null, a value so that decode(encode(X)) == X.
    • encodeAsChar

      public char encodeAsChar()
      Returns a single char encoding of this Strand.
      Returns:
      a value so that decode(encodeAsChar(X)) == X.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Strand>