IsEmpty() public method

public IsEmpty ( ) : bool
return bool
示例#1
0
        private void Join(ArrayList terminalNodes, BitSet lset, NamespaceList lany, BitSet rset, NamespaceList rany, out BitSet set, out NamespaceList any)
        {
            if (lset != null)
            {
                if (rset != null)
                {
                    set = lset.Clone();
                    set.And(rset);
                    if (!set.IsEmpty)
                    {
                        goto error;
                    }
                    set.Or(lset);
                    set.Or(rset);
                }
                else
                {
                    set = lset;
                }
            }
            else
            {
                set = rset;
            }

            if (lany != null)
            {
                if (rany != null)
                {
                    NamespaceList list = NamespaceList.Intersection(rany, lany);
                    if (list == null || list.IsEmpty())
                    {
                        any = NamespaceList.Union(rany, lany);
                    }
                    else
                    {
                        goto error;
                    }
                }
                else
                {
                    any = lany;
                }
            }
            else
            {
                any = rany;
            }

            if (any != null && set != null)
            {
                for (int i = 0; i < set.Count; i++)
                {
                    if (set.Get(i) && any.Allows(((TerminalNode)terminalNodes[i]).Name))
                    {
                        goto error;
                    }
                }
            }
            return;

error:
            throw new XmlSchemaException(Res.Sch_NonDeterministicAny);
        }