@Override
    public @NotNull Boolean getNextState(@NotNull T element, @NotNull Boolean state) {
      return !state;
    }
@Override
    public @NotNull Boolean getNextState(@NotNull T element, @NotNull Boolean state)