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 / util / Collections$SingletonMap.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.2 KB  |  63 lines

  1. package java.util;
  2.  
  3. import java.io.Serializable;
  4.  
  5. class Collections$SingletonMap extends AbstractMap implements Serializable {
  6.    // $FF: renamed from: k java.lang.Object
  7.    private final Object field_0;
  8.    // $FF: renamed from: v java.lang.Object
  9.    private final Object field_1;
  10.    private transient Set keySet = null;
  11.    private transient Set entrySet = null;
  12.    private transient Collection values = null;
  13.  
  14.    Collections$SingletonMap(Object var1, Object var2) {
  15.       this.field_0 = var1;
  16.       this.field_1 = var2;
  17.    }
  18.  
  19.    public int size() {
  20.       return 1;
  21.    }
  22.  
  23.    public boolean isEmpty() {
  24.       return false;
  25.    }
  26.  
  27.    public boolean containsKey(Object var1) {
  28.       return Collections.access$100(var1, this.field_0);
  29.    }
  30.  
  31.    public boolean containsValue(Object var1) {
  32.       return Collections.access$100(var1, this.field_1);
  33.    }
  34.  
  35.    public Object get(Object var1) {
  36.       return Collections.access$100(var1, this.field_0) ? this.field_1 : null;
  37.    }
  38.  
  39.    public Set keySet() {
  40.       if (this.keySet == null) {
  41.          this.keySet = Collections.singleton(this.field_0);
  42.       }
  43.  
  44.       return this.keySet;
  45.    }
  46.  
  47.    public Set entrySet() {
  48.       if (this.entrySet == null) {
  49.          this.entrySet = Collections.singleton(new Collections.SingletonMap.ImmutableEntry(this.field_0, this.field_1));
  50.       }
  51.  
  52.       return this.entrySet;
  53.    }
  54.  
  55.    public Collection values() {
  56.       if (this.values == null) {
  57.          this.values = Collections.singleton(this.field_1);
  58.       }
  59.  
  60.       return this.values;
  61.    }
  62. }
  63.