mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-02 16:05:29 +00:00
Use more appropriate names in probability collection loader
This commit is contained in:
parent
e756953828
commit
c190485dbe
@ -52,18 +52,18 @@ public class ProbabilityCollectionLoader implements TypeLoader<ProbabilityCollec
|
||||
configLoader.loadType(Integer.class, entry.getValue(), depthTracker.entry((String) entry.getKey())));
|
||||
}
|
||||
} else if(o instanceof List) {
|
||||
List<Map<Object, Object>> map = (List<Map<Object, Object>>) o;
|
||||
if(map.size() == 1) {
|
||||
Map<Object, Object> entry = map.getFirst();
|
||||
if(entry.size() == 1) {
|
||||
for(Object value : entry.keySet()) {
|
||||
List<Map<Object, Object>> list = (List<Map<Object, Object>>) o;
|
||||
if(list.size() == 1) {
|
||||
Map<Object, Object> map = list.getFirst();
|
||||
if(map.size() == 1) {
|
||||
for(Object value : map.keySet()) {
|
||||
return new ProbabilityCollection.Singleton<>(configLoader.loadType(generic, value, depthTracker));
|
||||
}
|
||||
}
|
||||
}
|
||||
for(int i = 0; i < map.size(); i++) {
|
||||
Map<Object, Object> l = map.get(i);
|
||||
for(Entry<Object, Object> entry : l.entrySet()) {
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
Map<Object, Object> map = list.get(i);
|
||||
for(Entry<Object, Object> entry : map.entrySet()) {
|
||||
if(entry.getValue() == null) throw new LoadException("No probability defined for entry \"" + entry.getKey() + "\"",
|
||||
depthTracker);
|
||||
Object val = configLoader.loadType(generic, entry.getKey(), depthTracker.index(i).entry((String) entry.getKey()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user