mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-04 15:27:30 +07:00
Implemented putting excel entries
This commit is contained in:
@ -558,13 +558,13 @@ public abstract class Excel<
|
||||
E entry
|
||||
) throws IllegalAccessException {
|
||||
if (indexed) {
|
||||
excel.put(i, entry);
|
||||
excel._put(i, entry);
|
||||
} else if (primaryKeyType == int.class) {
|
||||
int id = primaryKey.getInt(entry);
|
||||
excel.put(id, entry);
|
||||
excel._put(id, entry);
|
||||
} else if (primaryKeyType == String.class) {
|
||||
String id = (String) primaryKey.get(entry);
|
||||
excel.put(i, entry);
|
||||
excel._put(i, entry);
|
||||
|
||||
if (excel.stringToIndex == EMPTY_OBJECT_INT_MAP) excel.stringToIndex = new ObjectIntMap<>();
|
||||
if (!excel.stringToIndex.containsKey(id)) excel.stringToIndex.put(id, i);
|
||||
@ -599,6 +599,11 @@ public abstract class Excel<
|
||||
return entryClass;
|
||||
}
|
||||
|
||||
final void _put(int id, E value) {
|
||||
entries.put(id, value);
|
||||
put(id, value);
|
||||
}
|
||||
|
||||
protected void put(int id, E value) {}
|
||||
|
||||
protected int offset() {
|
||||
|
Reference in New Issue
Block a user