I have the following method in a Java library :
public void setColumnComparator(final int columnIndex, final Comparator<T> columnComparator)
The idea says that she has the following prototype:
setColumnComparator(columnIndex: Int, columnComparator: ((Any!, Any!) -> Int)!)
How can i use it? I know that it will be String
, so I want something like this, but it does not compile.
setColumnComparator(0, Comparator<String> { a, b -> a.compareTo(b) }
source
share