528 lines · 19.5 KB · Java
RawDownload
            if (!aset.containsValue(attrs[i])) {                return false;            }        }        return true;    }     /**     * Returns the hash code value for this attribute set.     * The hash code of an attribute set is defined to be the sum     * of the hash codes of each entry in the AttributeSet.     * This ensures that <tt>t1.equals(t2)</tt> implies that     * <tt>t1.hashCode()==t2.hashCode()</tt> for any two attribute sets     * <tt>t1</tt> and <tt>t2</tt>, as required by the general contract of     * {@link java.lang.Object#hashCode() <CODE>Object.hashCode()</CODE>}.     *     * @return  The hash code value for this attribute set.     */    public int hashCode() {        int hcode = 0;        Attribute[] attrs = toArray();        for (int i=0;i<attrs.length; i++) {            hcode += attrs[i].hashCode();        }        return hcode;    } }

Lines 501–528 of 528. Previous lines