1126 |
|
} |
1127 |
|
|
1128 |
|
public boolean equals(Object o) { |
1129 |
+ |
// If not acting as entry, just use default. |
1130 |
+ |
if (lastReturned == null) |
1131 |
+ |
return super.equals(o); |
1132 |
|
if (!(o instanceof Map.Entry)) |
1133 |
|
return false; |
1134 |
|
Map.Entry e = (Map.Entry)o; |
1136 |
|
} |
1137 |
|
|
1138 |
|
public int hashCode() { |
1139 |
+ |
// If not acting as entry, just use default. |
1140 |
+ |
if (lastReturned == null) |
1141 |
+ |
return super.hashCode(); |
1142 |
+ |
|
1143 |
|
Object k = getKey(); |
1144 |
|
Object v = getValue(); |
1145 |
|
return ((k == null) ? 0 : k.hashCode()) ^ |
1147 |
|
} |
1148 |
|
|
1149 |
|
public String toString() { |
1150 |
< |
// If not acting as entry, just use default toString. |
1150 |
> |
// If not acting as entry, just use default. |
1151 |
|
if (lastReturned == null) |
1152 |
|
return super.toString(); |
1153 |
|
else |