Class AbstractSAMHeaderRecord

    • Constructor Detail

      • AbstractSAMHeaderRecord

        public AbstractSAMHeaderRecord()
    • Method Detail

      • setAttribute

        @Deprecated
        public void setAttribute​(String key,
                                 Object value)
        Deprecated.
        Set the given value for the attribute named 'key'. Replaces an existing value, if any. If value is null, the attribute is removed. Otherwise, the value will be converted to a String with toString.
        Parameters:
        key - attribute name
        value - attribute value
      • setAttribute

        public void setAttribute​(SAMTag tag,
                                 String value)
        Set the given value for the SAMTag 'tag'. Replaces an existing value, if any. If value is null, the attribute is removed.
        Parameters:
        tag - attribute name
        value - attribute value
      • setAttribute

        public void setAttribute​(String key,
                                 String value)
        Set the given value for the attribute named 'key'. Replaces an existing value, if any. If value is null, the attribute is removed.
        Parameters:
        key - attribute name
        value - attribute value
      • getId

        public String getId()
        Returns the ID tag (or equivalent) for this header record. The default implementation throws a SAMException to indicate "not implemented".
      • attributesEqual

        protected boolean attributesEqual​(AbstractSAMHeaderRecord that)
        For use in the equals() method of the concrete class.
      • attributesHashCode

        protected int attributesHashCode()
        For use in the hashCode() method of the concrete class.
      • toString

        public String toString()
        Simple to String that outputs the concrete class name and the set of attributes stored.
        Overrides:
        toString in class Object
      • getSAMString

        public abstract String getSAMString()
        Returns the record in the SAM line-based text format. Fields are separated by '\t' characters. The String is NOT terminated by '\n'.