private static <T> boolean add(@NotNull BiPredicate<? super T, ? super T> predicate, @NotNull List<T> list, @NotNull T object) {
    for (T each : list) if (predicate.test(each, object)) return false;
    list.removeIf(each -> predicate.test(object, each));
    list.add(object);
    return true;
  }
private static <T> boolean add(@NotNull BiPredicate<? super T, ? super T> predicate, @NotNull List<T> list, @NotNull T object)