Some Galileo inspired raw type elimination.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2637 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -81,7 +81,7 @@ public class CollectionUtil
|
||||
{
|
||||
int size = col.size();
|
||||
if (size > limit) {
|
||||
if (col instanceof List) {
|
||||
if (col instanceof List<?>) {
|
||||
((List<?>) col).subList(limit, size).clear();
|
||||
|
||||
} else {
|
||||
|
||||
@@ -176,7 +176,7 @@ public class CountHashMap<K> extends HashMap<K, int[]>
|
||||
}
|
||||
|
||||
@Override public boolean equals (Object o) {
|
||||
if (!(o instanceof CountEntryImpl)) {
|
||||
if (!(o instanceof CountEntryImpl<?>)) {
|
||||
return false;
|
||||
}
|
||||
@SuppressWarnings("unchecked") CountEntryImpl<K> other = (CountEntryImpl<K>)o;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class GenUtil
|
||||
{
|
||||
if (type instanceof GenericArrayType) {
|
||||
return simpleName(((GenericArrayType)type).getGenericComponentType()) + "[]";
|
||||
} else if (type instanceof Class) {
|
||||
} else if (type instanceof Class<?>) {
|
||||
Class<?> clazz = (Class<?>)type;
|
||||
if (clazz.isArray()) {
|
||||
return simpleName(clazz.getComponentType()) + "[]";
|
||||
|
||||
@@ -556,7 +556,7 @@ public class HashIntMap<V> extends AbstractMap<Integer,V>
|
||||
|
||||
@Override public boolean equals (Object o)
|
||||
{
|
||||
if (!(o instanceof IntEntry)) {
|
||||
if (!(o instanceof IntEntry<?>)) {
|
||||
return false;
|
||||
}
|
||||
IntEntry<?> that = (IntEntry<?>)o;
|
||||
|
||||
@@ -66,7 +66,7 @@ public class MapEntry<K,V> implements Map.Entry<K,V>
|
||||
@Override // from Object
|
||||
public boolean equals (Object o)
|
||||
{
|
||||
if (!(o instanceof Map.Entry)) {
|
||||
if (!(o instanceof Map.Entry<?, ?>)) {
|
||||
return false;
|
||||
}
|
||||
Map.Entry<?, ?> e = (Map.Entry<?, ?>)o;
|
||||
|
||||
@@ -501,10 +501,10 @@ public class StringUtil
|
||||
}
|
||||
buf.append(closeBox);
|
||||
|
||||
} else if (val instanceof Iterable) {
|
||||
} else if (val instanceof Iterable<?>) {
|
||||
toString(buf, ((Iterable<?>)val).iterator(), openBox, closeBox);
|
||||
|
||||
} else if (val instanceof Iterator) {
|
||||
} else if (val instanceof Iterator<?>) {
|
||||
buf.append(openBox);
|
||||
Iterator<?> iter = (Iterator<?>)val;
|
||||
for (int i = 0; iter.hasNext(); i++) {
|
||||
@@ -515,7 +515,7 @@ public class StringUtil
|
||||
}
|
||||
buf.append(closeBox);
|
||||
|
||||
} else if (val instanceof Enumeration) {
|
||||
} else if (val instanceof Enumeration<?>) {
|
||||
buf.append(openBox);
|
||||
Enumeration<?> enm = (Enumeration<?>)val;
|
||||
for (int i = 0; enm.hasMoreElements(); i++) {
|
||||
@@ -571,7 +571,7 @@ public class StringUtil
|
||||
public static void listToString (StringBuilder buf, Object val, Formatter formatter)
|
||||
{
|
||||
// get an iterator if this is a collection
|
||||
if (val instanceof Iterable) {
|
||||
if (val instanceof Iterable<?>) {
|
||||
val = ((Iterable<?>)val).iterator();
|
||||
}
|
||||
|
||||
@@ -589,7 +589,7 @@ public class StringUtil
|
||||
}
|
||||
buf.append(closeBox);
|
||||
|
||||
} else if (val instanceof Iterator) {
|
||||
} else if (val instanceof Iterator<?>) {
|
||||
buf.append(openBox);
|
||||
Iterator<?> iter = (Iterator<?>)val;
|
||||
for (int i = 0; iter.hasNext(); i++) {
|
||||
@@ -600,7 +600,7 @@ public class StringUtil
|
||||
}
|
||||
buf.append(closeBox);
|
||||
|
||||
} else if (val instanceof Enumeration) {
|
||||
} else if (val instanceof Enumeration<?>) {
|
||||
buf.append(openBox);
|
||||
Enumeration<?> enm = (Enumeration<?>)val;
|
||||
for (int i = 0; enm.hasMoreElements(); i++) {
|
||||
|
||||
@@ -67,7 +67,7 @@ public class Triple<A,B,C> implements Serializable
|
||||
@Override // from Object
|
||||
public boolean equals (Object other)
|
||||
{
|
||||
if (!(other instanceof Triple)) {
|
||||
if (!(other instanceof Triple<?, ?, ?>)) {
|
||||
return false;
|
||||
}
|
||||
Triple<?, ?, ?> to = (Triple<?, ?, ?>)other;
|
||||
|
||||
@@ -64,7 +64,7 @@ public class Tuple<L,R> implements Serializable
|
||||
@Override // from Object
|
||||
public boolean equals (Object other)
|
||||
{
|
||||
if (!(other instanceof Tuple)) {
|
||||
if (!(other instanceof Tuple<?, ?>)) {
|
||||
return false;
|
||||
}
|
||||
Tuple<?, ?> to = (Tuple<?, ?>)other;
|
||||
|
||||
Reference in New Issue
Block a user