Mercurial > projects > dwt2
comparison java/src/java/util/Map.d @ 21:9b96950f2c3c
the 'java' tree compiles on both D1-Tango and D2-Phobos
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 19 Mar 2009 20:38:55 +0100 |
parents | eb8ff453285d |
children |
comparison
equal
deleted
inserted
replaced
20:dccb717aa902 | 21:9b96950f2c3c |
---|---|
15 public void clear(); | 15 public void clear(); |
16 public bool containsKey(Object key); | 16 public bool containsKey(Object key); |
17 public bool containsKey(String key); | 17 public bool containsKey(String key); |
18 public bool containsValue(Object value); | 18 public bool containsValue(Object value); |
19 public Set entrySet(); | 19 public Set entrySet(); |
20 public int opEquals(Object o); | 20 public equals_t opEquals(Object o); |
21 public Object get(Object key); | 21 public Object get(Object key); |
22 public Object get(String key); | 22 public Object get(String key); |
23 public hash_t toHash(); | 23 public hash_t toHash(); |
24 public bool isEmpty(); | 24 public bool isEmpty(); |
25 public Set keySet(); | 25 public Set keySet(); |
42 Object key; | 42 Object key; |
43 this( Map map, Object key){ | 43 this( Map map, Object key){ |
44 this.map = map; | 44 this.map = map; |
45 this.key = key; | 45 this.key = key; |
46 } | 46 } |
47 public override int opEquals(Object o){ | 47 public override equals_t opEquals(Object o){ |
48 if( auto other = cast(MapEntry)o){ | 48 if( auto other = cast(MapEntry)o){ |
49 | 49 |
50 if(( getKey() is null ? other.getKey() is null : getKey() == other.getKey() ) && | 50 if(( getKey() is null ? other.getKey() is null : getKey() == other.getKey() ) && |
51 ( getValue() is null ? other.getValue() is null : getValue() == other.getValue() )){ | 51 ( getValue() is null ? other.getValue() is null : getValue() == other.getValue() )){ |
52 return true; | 52 return true; |