mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-01 02:14:32 +07:00
Added getter and checker for stat ids
This commit is contained in:
parent
fa7e066ee1
commit
8b06f92f54
@ -32,6 +32,18 @@ public final class StatListBuilder {
|
||||
return stats.get(list);
|
||||
}
|
||||
|
||||
/** @see StatList#indexOf(int, short) */
|
||||
public StatGetter get(short stat) {
|
||||
index = stats.indexOf(list, stat);
|
||||
if (index < 0) return null;
|
||||
return tuple.update(index);
|
||||
}
|
||||
|
||||
/** @see StatList#contains(int, short) */
|
||||
public boolean contains(short stat) {
|
||||
return stats.contains(list, stat);
|
||||
}
|
||||
|
||||
/** @see StatList#get(int) */
|
||||
public StatGetter last() {
|
||||
if (index < 0) throw new IllegalStateException("cannot retrieve last stat when no stats have been added yet!");
|
||||
|
Loading…
Reference in New Issue
Block a user