home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / java / text / AttributeEntry.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.2 KB  |  43 lines

  1. package java.text;
  2.  
  3. import java.util.Map;
  4.  
  5. class AttributeEntry implements Map.Entry {
  6.    private AttributedCharacterIterator.Attribute key;
  7.    private Object value;
  8.  
  9.    AttributeEntry(AttributedCharacterIterator.Attribute var1, Object var2) {
  10.       this.key = var1;
  11.       this.value = var2;
  12.    }
  13.  
  14.    public boolean equals(Object var1) {
  15.       if (!(var1 instanceof AttributeEntry)) {
  16.          return false;
  17.       } else {
  18.          AttributeEntry var2 = (AttributeEntry)var1;
  19.          return var2.key.equals(this.key) && (this.value == null ? var2.value == null : var2.value.equals(this.value));
  20.       }
  21.    }
  22.  
  23.    public Object getKey() {
  24.       return this.key;
  25.    }
  26.  
  27.    public Object getValue() {
  28.       return this.value;
  29.    }
  30.  
  31.    public Object setValue(Object var1) {
  32.       throw new UnsupportedOperationException();
  33.    }
  34.  
  35.    public int hashCode() {
  36.       return this.key.hashCode() ^ (this.value == null ? 0 : this.value.hashCode());
  37.    }
  38.  
  39.    public String toString() {
  40.       return this.key.toString() + "=" + this.value.toString();
  41.    }
  42. }
  43.