src/solaris/classes/sun/print/AttributeClass.java

Print this page

        

*** 23,32 **** --- 23,33 ---- * questions. */ package sun.print; import java.io.ByteArrayInputStream; + import java.util.Objects; public class AttributeClass { private String myName; private int myType; private int nameLen;
*** 248,260 **** return myName; } public boolean equals(Object obj) { return - obj != null && obj instanceof AttributeClass && ! obj.toString().equals (((AttributeClass) obj).toString()); } public String toString() { return myName; } --- 249,264 ---- return myName; } public boolean equals(Object obj) { return obj instanceof AttributeClass && ! toString().equals(((AttributeClass) obj).toString()); ! } ! ! public int hashCode() { ! return Objects.hashCode(toString()); } public String toString() { return myName; }