다음 설정이 있습니다.Guava의 HashBasedTable cellSet()
Table<Integer, Integer, Float> store = HashBasedTable.create();
int i = 0, j = 0;
for (List<String> stack_i : stacks) {
j = 0;
for (String entry_j : stack_i) {
Float alpha = doSomeMagic(entry_j, token);
if (alpha != null)
store.put(i, j, alpha);
j++;
}
i++;
}
if (store.cellSet().size() > 0) {
for (Table.Cell<Integer, Integer, Float> cell : store.cellSet()) {
if (cell.getValue() > max) {
max = cell.getValue();
maxchainIndex = cell.getRowKey();
}
}
}
나는 다음과 같은 JVM 오류 얻을 수 있습니다로 실행하고 문제 :
SEVERE: java.lang.IllegalAccessError: tried to access method com.google.common.collect.Iterators.emptyModifiableIterator()Ljava/util/Iterator; from class com.google.common.collect.StandardTable$CellIterator at com.google.common.collect.StandardTable$CellIterator.(StandardTable.java:310) at com.google.common.collect.StandardTable$CellIterator.(StandardTable.java:306) at com.google.common.collect.StandardTable$CellSet.iterator(StandardTable.java:280)
오류 라인
for(Table.Cell<Integer,Integer,Float> cell:store.cellSet())
에서 발생 내가 뭘 잘못 볼 수 없습니다를 이리. 내가 확인한 상점에 적어도 1 개의 항목이 있습니다.
오류를 재현하기 위해 컴파일하고 실행할 수있는 코드 샘플을 제공해주십시오. –