You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2003/11/08 19:40:17 UTC
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections AbstractDualBidiMap.java BidiMap.java
scolebourne 2003/11/08 10:40:17
Modified: collections/src/java/org/apache/commons/collections
AbstractDualBidiMap.java BidiMap.java
Log:
Rename BidiMap removeKey to removeValue
Revision Changes Path
1.9 +3 -16 jakarta-commons/collections/src/java/org/apache/commons/collections/AbstractDualBidiMap.java
Index: AbstractDualBidiMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/AbstractDualBidiMap.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- AbstractDualBidiMap.java 2 Nov 2003 19:48:39 -0000 1.8
+++ AbstractDualBidiMap.java 8 Nov 2003 18:40:17 -0000 1.9
@@ -67,7 +67,6 @@
import org.apache.commons.collections.decorators.AbstractMapEntryDecorator;
import org.apache.commons.collections.iterators.MapIterator;
import org.apache.commons.collections.iterators.ResetableMapIterator;
-import org.apache.commons.collections.pairs.TiedMapEntry;
/**
* Abstract <code>BidiMap</code> implemented using two maps.
@@ -240,7 +239,7 @@
return maps[1].get(value);
}
- public Object removeKey(Object value) {
+ public Object removeValue(Object value) {
Object key = null;
if (maps[1].containsKey(value)) {
key = maps[1].remove(value);
@@ -613,18 +612,6 @@
iterator = map.maps[0].entrySet().iterator();
last = null;
canRemove = false;
- }
-
- public Map.Entry asMapEntry() {
- return new TiedMapEntry(map, getKey()) {
- public Object setValue(Object value) {
- if (map.maps[1].containsKey(value) &&
- map.maps[1].get(value) != last.getKey()) {
- throw new IllegalArgumentException("Cannot use setValue() when the object being set is already in the map");
- }
- return super.setValue(value);
- }
- };
}
public String toString() {
1.6 +3 -3 jakarta-commons/collections/src/java/org/apache/commons/collections/BidiMap.java
Index: BidiMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/BidiMap.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- BidiMap.java 2 Nov 2003 15:27:53 -0000 1.5
+++ BidiMap.java 8 Nov 2003 18:40:17 -0000 1.6
@@ -168,7 +168,7 @@
* @throws UnsupportedOperationException if this method is not supported
* by the implementation
*/
- Object removeKey(Object value);
+ Object removeValue(Object value);
/**
* Gets a view of this map where the keys and values are reversed.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org