/** * <p> * Tests for type equality. This is only necessary, * to handle the case where two <code>Type</code> objects * are loaded by different class loaders. * </p> * * @param o the object compared for equality to this type * * @return true if and only if <code>o</code> represents * the same type * * @see java.lang.Object#equals(Object) */ public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (this.hashCode() != o.hashCode()) return false; if (!o.getClass().getName().equals("nu.xom.Attribute.Type")) { return false; } return true; }
/** Reuses XOM's way of representing attribute types */ public static byte getAttributeTypeCode(Attribute attr) { return (byte) attr.getType().hashCode(); }
/** Reuses XOM's way of representing attribute types */ public static byte getAttributeTypeCode(Attribute attr) { return (byte) attr.getType().hashCode(); }