void (@NotNull Component component, @NotNull ToIntFunction<? super JTree> rowFunc) { if (component instanceof JTree tree) { int rowNew = rowFunc.applyAsInt(tree); int rowOld = rowHolder.getAndSet(rowNew); if (rowNew != rowOld) onHover(tree, rowNew); } }