public @NotNull TreeNodeState putAndPass(final T node, final @NotNull TreeNodeState state) {
    if (TreeNodeState.SELECTED.equals(state)) {
      mySelected.add(node);
      myCache.remove(node);
    } else {
      mySelected.remove(node);
      myCache.put(node, state);
    }
    return state;
  }
public @NotNull TreeNodeState putAndPass(final T node, final @NotNull TreeNodeState state)