static public Middle GetInstance(IHashableFeature feature)
        {
            Middle middle = new Middle();

            middle.FeatureCollection = new Feature[] { (Feature)feature };
            return(middle);
        }
        private static IEnumerable <IHashableFeature> BegMiddleEndOfPeptide(IHashableFeature regionFeature)
        {
            yield return(Begin.GetInstance(regionFeature));

            yield return(Middle.GetInstance(regionFeature));

            yield return(End.GetInstance(regionFeature));
        }
        public override bool Equals(object obj)
        {
            Middle other = obj as Middle;

            if (other == null)
            {
                return(false);
            }
            if (FeatureCollection.Length == 0)
            {
                Debug.Assert(obj.ToString() == ToString());
                return(true);
            }
            bool b = FeatureCollection[0].Equals(other.FeatureCollection[0]);

            Debug.Assert(b == (obj.ToString() == ToString())); // real assert
            return(b);
        }