Moved modification functions #add(StatGetter) and #addAll(StatListGetter)

Moved modification functions #add(StatGetter) and #addAll(StatListGetter) from StatListGetter to StatListBuilder
StatListGetter should contain read-only operations
This commit is contained in:
Collin Smith 2020-09-03 17:57:20 -07:00
parent 4c96af70d3
commit bf5b0677cc
2 changed files with 10 additions and 8 deletions

View File

@ -67,4 +67,14 @@ public final class StatListBuilder {
index = stats.put(list, stat, value);
return this;
}
/** @see StatList#add(int, StatGetter) */
public void add(StatGetter stat) {
stats.add(list, stat);
}
/** @see StatList#addAll(int, StatList, int) */
public void addAll(StatListGetter src) {
stats.addAll(list, src.stats, src.list);
}
}

View File

@ -95,14 +95,6 @@ public final class StatListGetter implements Iterable<StatGetter> {
return tuple.set(stats, index);
}
public void add(StatGetter stat) {
stats.add(list, stat);
}
public void addAll(StatListGetter src) {
stats.addAll(list, src.stats, src.list);
}
/** @see StatList#indexIterator(int) */
public StatList.IndexIterator indexIterator() {
return stats.indexIterator(list);