public void addFlag(final boolean isOn, final Set<NodeFlag> flags) {
        Objects.requireNonNull(flags);

        final NodeFlag flagToAdd = isOn
                ? on
                : off;
        final NodeFlag flagToRemove = isOn
                ? off
                : on;

        flags.remove(flagToRemove);
        flags.add(flagToAdd);
        NodeFlag.validateFlag(flagToAdd, flags);
    }
Adds nodeFlag to the provided flags set after removing the other member of this {@link NodeFlagPair}

@param isOn  The flag to add based on its state
@param flags Set to add to
stroom-core-shared/src/main/java/stroom/explorer/shared/NodeFlagPair.java