internal bool ContainsOccurrence(IOccurrence iocc)
        {
            if (RightMostSet == null || RightMostSet.Count <= 0)
            {
                return(false);
            }

            return(RightMostSet.Any(t => t.RightMostIndex == iocc.RightMostIndex));
        }
        internal int AddOccurrence(IOccurrence occ)
        {
            if (occ.TreeId != TreeId || occ.RootIndex != RootIndex)
            {
                throw new InvalidOperationException();
            }

            if (RightMostSet == null)
            {
                RightMostSet = new List <IOccurrence>();
            }

            RightMostSet.Add(occ);

            return(RightMostSet.Count == 1 ? 1 : 0);
        }