type generalization for mutable mappings

This commit is contained in:
Julian Dolby 2014-02-08 21:42:16 -05:00 committed by Michael Heilmann
parent d962543b87
commit b0bc00e276
3 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ public class MutableMapping<T> implements OrdinalSetMapping<T> {
}
@Override
public int getMappedIndex(T o) {
public int getMappedIndex(Object o) {
Integer I = map.get(o);
if (I == null) {
return -1;

View File

@ -55,7 +55,7 @@ public class OffsetOrdinalSetMapping<T> implements OrdinalSetMapping<T> {
}
@Override
public int getMappedIndex(T o) {
public int getMappedIndex(Object o) {
if (delegate.getMappedIndex(o) == -1) {
return -1;
}

View File

@ -24,7 +24,7 @@ public interface OrdinalSetMapping<T> extends Iterable<T> {
/**
* @return the number of a given object, or -1 if the object is not currently in the range.
*/
public int getMappedIndex(T o);
public int getMappedIndex(Object o);
/**
* @return whether the given object is mapped by this mapping