I'm trying to sort an ArrayList by two criterias: ascending in both row and col. I'm getting the following error:
Multiple markers at this line
- Syntax error on tokens, delete these tokens
- The method RowColElem() is undefined for the type
DenseBoard<T>
- The method RowColElem() is undefined for the type
DenseBoard<T>
- Syntax error on tokens, delete these tokens
Here's a simplified version of my code:
public class DenseBoard<T>{
private ArrayList<RowColElem<T>> tempDiagList;
public void foo() {
Collections.sort(tempDiagList, Comparator.comparingInt(RowColElem::getRow())
.thenComparingInt(RowColElem::getCol()));
}
}
RowColElem::getRow()andRowColElem::getCol().RowColElem::getRowandRowColElem::getColbut sill getting errors.Multiple markers at this line - RowColElem cannot be resolved to a variable - Syntax error on tokens, delete these tokens - Syntax error on tokens, delete these tokens - RowColElem cannot be resolved to a variable