void (@NotNull Component component, @NotNull ToIntFunction<? super JTable> rowFunc, @NotNull ToIntFunction<? super JTable> columnFunc) { if (component instanceof JTable table) { int rowNew = rowFunc.applyAsInt(table); int rowOld = rowHolder.getAndSet(rowNew); int columnNew = columnFunc.applyAsInt(table); int columnOld = columnHolder.getAndSet(columnNew); if (rowNew != rowOld || columnNew != columnOld) onHover(table, rowNew, columnNew); } }