GetSubGroups() private method

private GetSubGroups ( ) : LayoutFarm.TextBreak.WordGroup[]
return LayoutFarm.TextBreak.WordGroup[]
Beispiel #1
0
        internal WordGroup GetSubGroup(WordVisitor visitor, WordGroup wordGroup)
        {
            char c = visitor.Char;

            if (!CanHandle(c))
            {
                //can't handle
                //then no furtur sub group
                visitor.State = VisitorState.OutOfRangeChar;
                return(null);
            }
            //-----------------
            //can handle
            WordGroup[] subGroups = wordGroup.GetSubGroups();
            if (subGroups != null)
            {
                return(subGroups[c - this.FirstUnicodeChar]);
            }
            return(null);
        }
        internal WordGroup GetSubGroup(WordVisitor visitor, WordGroup wordGroup)
        {

            char c = visitor.Char;
            if (!CanHandle(c))
            {
                //can't handle
                //then no furtur sub group
                visitor.State = VisitorState.OutOfRangeChar;
                return null;
            }
            //-----------------
            //can handle 
            WordGroup[] subGroups = wordGroup.GetSubGroups();
            if (subGroups != null)
            {
                return subGroups[c - this.FirstUnicodeChar];
            }
            return null;
        }