Beispiel #1
0
        /// <summary>
        /// Equals
        /// </summary>
        public bool Equals(Rna other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
            else if (null == other)
            {
                return(false);
            }

            return(Enumerable.SequenceEqual(m_Items, other.m_Items));
        }
Beispiel #2
0
        /// <summary>
        /// Standard Constructor
        /// </summary>
        public static Rna FromDna(Dna source)
        {
            if (null == source)
            {
                throw new ArgumentNullException(nameof(source));
            }

            Rna result = new Rna()
            {
                m_Items = new List <RnaNuclearbase>(source.Count)
            };

            for (int i = 0; i < source.Count; ++i)
            {
                result.m_Items.Add(source[i].RnaComplement());
            }

            return(result);
        }