home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / util / Collections$CheckedMap$CheckedEntrySet$CheckedEntry.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.9 KB  |  46 lines

  1. package java.util;
  2.  
  3. class Collections$CheckedMap$CheckedEntrySet$CheckedEntry<K, V> implements Map.Entry<K, V> {
  4.    // $FF: renamed from: e java.util.Map.Entry
  5.    private Map.Entry<K, V> field_0;
  6.    private Class<V> valueType;
  7.  
  8.    Collections$CheckedMap$CheckedEntrySet$CheckedEntry(Map.Entry<K, V> var1, Class<V> var2) {
  9.       this.field_0 = var1;
  10.       this.valueType = var2;
  11.    }
  12.  
  13.    public K getKey() {
  14.       return (K)this.field_0.getKey();
  15.    }
  16.  
  17.    public V getValue() {
  18.       return (V)this.field_0.getValue();
  19.    }
  20.  
  21.    public int hashCode() {
  22.       return this.field_0.hashCode();
  23.    }
  24.  
  25.    public String toString() {
  26.       return this.field_0.toString();
  27.    }
  28.  
  29.    public V setValue(V var1) {
  30.       if (!this.valueType.isInstance(var1)) {
  31.          throw new ClassCastException("Attempt to insert " + var1.getClass() + " value into collection with value type " + this.valueType);
  32.       } else {
  33.          return (V)this.field_0.setValue(var1);
  34.       }
  35.    }
  36.  
  37.    public boolean equals(Object var1) {
  38.       if (!(var1 instanceof Map.Entry)) {
  39.          return false;
  40.       } else {
  41.          Map.Entry var2 = (Map.Entry)var1;
  42.          return Collections.access$000(this.field_0.getKey(), var2.getKey()) && Collections.access$000(this.field_0.getValue(), var2.getValue());
  43.       }
  44.    }
  45. }
  46.