Enum Strand

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

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