Minor fixes of unecessary casts/imports
bug 37915, from Nathan Beyer git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@357494 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8de0ec3481
commit
115c961ee4
|
@ -193,6 +193,9 @@
|
||||||
<contributor>
|
<contributor>
|
||||||
<name>Christopher Berry</name>
|
<name>Christopher Berry</name>
|
||||||
</contributor>
|
</contributor>
|
||||||
|
<contributor>
|
||||||
|
<name>Nathan Beyer</name>
|
||||||
|
</contributor>
|
||||||
<contributor>
|
<contributor>
|
||||||
<name>Janek Bogucki</name>
|
<name>Janek Bogucki</name>
|
||||||
</contributor>
|
</contributor>
|
||||||
|
|
|
@ -181,7 +181,7 @@ public abstract class DefaultMapBag implements Bag {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (Iterator it = _map.keySet().iterator(); it.hasNext();) {
|
for (Iterator it = _map.keySet().iterator(); it.hasNext();) {
|
||||||
Object element = (Object) it.next();
|
Object element = it.next();
|
||||||
if (other.getCount(element) != getCount(element)) {
|
if (other.getCount(element) != getCount(element)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@ package org.apache.commons.collections;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -34,6 +33,7 @@ import org.apache.commons.collections.map.FixedSizeSortedMap;
|
||||||
import org.apache.commons.collections.map.LazyMap;
|
import org.apache.commons.collections.map.LazyMap;
|
||||||
import org.apache.commons.collections.map.LazySortedMap;
|
import org.apache.commons.collections.map.LazySortedMap;
|
||||||
import org.apache.commons.collections.map.ListOrderedMap;
|
import org.apache.commons.collections.map.ListOrderedMap;
|
||||||
|
import org.apache.commons.collections.map.MultiValueMap;
|
||||||
import org.apache.commons.collections.map.PredicatedMap;
|
import org.apache.commons.collections.map.PredicatedMap;
|
||||||
import org.apache.commons.collections.map.PredicatedSortedMap;
|
import org.apache.commons.collections.map.PredicatedSortedMap;
|
||||||
import org.apache.commons.collections.map.TransformedMap;
|
import org.apache.commons.collections.map.TransformedMap;
|
||||||
|
@ -42,7 +42,6 @@ import org.apache.commons.collections.map.TypedMap;
|
||||||
import org.apache.commons.collections.map.TypedSortedMap;
|
import org.apache.commons.collections.map.TypedSortedMap;
|
||||||
import org.apache.commons.collections.map.UnmodifiableMap;
|
import org.apache.commons.collections.map.UnmodifiableMap;
|
||||||
import org.apache.commons.collections.map.UnmodifiableSortedMap;
|
import org.apache.commons.collections.map.UnmodifiableSortedMap;
|
||||||
import org.apache.commons.collections.map.MultiValueMap;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides utility methods and decorators for
|
* Provides utility methods and decorators for
|
||||||
|
@ -1065,8 +1064,7 @@ public class MapUtils {
|
||||||
* If the input map had multiple entries with the same value mapped to
|
* If the input map had multiple entries with the same value mapped to
|
||||||
* different keys, the returned map will map one of those keys to the
|
* different keys, the returned map will map one of those keys to the
|
||||||
* value, but the exact key which will be mapped is undefined.
|
* value, but the exact key which will be mapped is undefined.
|
||||||
*
|
*
|
||||||
* @see DoubleOrderedMap
|
|
||||||
* @param map the map to invert, may not be null
|
* @param map the map to invert, may not be null
|
||||||
* @return a new HashMap containing the inverted data
|
* @return a new HashMap containing the inverted data
|
||||||
* @throws NullPointerException if the map is null
|
* @throws NullPointerException if the map is null
|
||||||
|
|
|
@ -114,7 +114,7 @@ public final class MapBackedSet implements Set, Serializable {
|
||||||
public boolean addAll(Collection coll) {
|
public boolean addAll(Collection coll) {
|
||||||
int size = map.size();
|
int size = map.size();
|
||||||
for (Iterator it = coll.iterator(); it.hasNext();) {
|
for (Iterator it = coll.iterator(); it.hasNext();) {
|
||||||
Object obj = (Object) it.next();
|
Object obj = it.next();
|
||||||
map.put(obj, dummyValue);
|
map.put(obj, dummyValue);
|
||||||
}
|
}
|
||||||
return (map.size() != size);
|
return (map.size() != size);
|
||||||
|
|
Loading…
Reference in New Issue