import java.util.Comparator; class Test> { Comparator> bySize = Comparator.comparingInt(Test::size); public int size() { return 0; } }