public void TearDown()
 {
     this.indexer = null; 
 }
        /// <summary>
        ///  Creates an accessor with its {Indexer}.
        /// <para></para>
        /// <see cref="QUT.Bio.BioPatML.Symbols.Accessor.AccessorCircular">AccessorCircular</see>
        /// <para></para>
        /// <see cref="QUT.Bio.BioPatML.Symbols.Accessor.AccessorLinear">AccessorLinear</see>
        /// <para></para>
        /// <see cref="QUT.Bio.BioPatML.Symbols.Accessor.AccessorComplement">AccessorComplement</see>
        /// 
        /// </summary>
        /// <param name="type"> Type of the accessor. See constants.</param>
        /// <param name="ioff"> Offset for the indexer.</param>
        /// <param name="ilen"> Length for the indexer.</param>
        /// <param name="length"> Length of the accessor section.</param>
        /// <param name="symbols"> Symbol array the accessor works on.</param>
        /// <returns> Returns an accessor. </returns>
        public static AccessorBase Instance
            (int type, int ioff, int ilen, int length, ISymbolArray symbols)
        {
            AccessorBase accessor   = null;
            Indexer.Indexer indexor = null;


            //Create the chosen Indexer
            if ((type & REVERSE) > 0)
                indexor = new IndexerReverse(ioff, ilen);

            else
                indexor = new IndexerDirect(ioff);


            //create the chosen accessor
            if ((type & CIRCULAR) > 0)
                accessor = new AccessorCircular(indexor, length, symbols);

            else
                if ((type & TRANSPARENT) > 0)
                    accessor = new AccessorTransparent(indexor, length, symbols);

            else
                accessor = new AccessorLinear(indexor, length, symbols);


            if ((type & COMPLEMENT) > 0)
                accessor = new AccessorComplement(accessor);


            return accessor;
        }
 public void SetUp()
 {
     indexer = new IndexerDirect(2);
 }