mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-13 08:15:20 +07:00
Improved lookup function to use upper case
This commit is contained in:
parent
9fa2244429
commit
f96011b9aa
@ -138,11 +138,15 @@ public abstract class Table<R> implements Iterable<R> {
|
||||
}
|
||||
|
||||
public int index(String id) {
|
||||
return lookup.get(id, -1);
|
||||
return lookup.get(toUpper(id), -1);
|
||||
}
|
||||
|
||||
public R get(String id) {
|
||||
return get(lookup.get(id, -1));
|
||||
return get(lookup.get(toUpper(id), -1));
|
||||
}
|
||||
|
||||
private String toUpper(String id) {
|
||||
return id == null ? null : id.toUpperCase();
|
||||
}
|
||||
|
||||
public int size() {
|
||||
|
Loading…
Reference in New Issue
Block a user