コード例 #1
0
ファイル: EmptyElement.cs プロジェクト: sillsdev/WorldPad
        /** Determines if this EmptyElement has the same attributes as another.
         * @param ee another EmptyElement
         * @return true if it has the same attributes
         */
        public bool hasSameAttributes(EmptyElement ee)
        {
            if (ee == null)
            {
                return(false);
            }
            bool same = countAttributes() == ee.countAttributes();

            if (same && m_attributes != null)
            { // count is the same, so if extra, one will not be equal
                foreach (Attribute a in m_attributes)
                {
                    Attribute a2 = ee.findAttribute(a.name);
                    if (!a.equals(a2))
                    {
                        return(false);
                    }
                }
            }
            return(same);
        }
コード例 #2
0
ファイル: EmptyElement.cs プロジェクト: bbriggs/FieldWorks
 /** Determines if this EmptyElement has the same attributes as another.
  * @param ee another EmptyElement
  * @return true if it has the same attributes
  */
 public bool hasSameAttributes(EmptyElement ee)
 {
     if (ee == null) return false;
        bool same = countAttributes() == ee.countAttributes();
        if (same && m_attributes != null)
        { // count is the same, so if extra, one will not be equal
        foreach (Attribute a in m_attributes)
        {
        Attribute a2 = ee.findAttribute(a.name);
        if (!a.equals(a2)) return false;
        }
        }
        return same;
 }