public void addFlag(final NodeFlag nodeFlag, final Set<NodeFlag> flags) {
        Objects.requireNonNull(flags);
        if (!this.nodeFlags.contains(nodeFlag)) {
            throw new IllegalArgumentException("nodeFlag " + nodeFlag + " not in " + this.nodeFlags);
        }

        for (final NodeFlag flag : this.nodeFlags) {
            if (!Objects.equals(flag, nodeFlag)) {
                flags.remove(flag);
            }
        }
        flags.add(nodeFlag);
        NodeFlag.validateFlag(nodeFlag, flags);
    }
Adds nodeFlag to the provided flags set after removing the other members of this {@link NodeFlagGroup}

@param nodeFlag Flag to add
@param flags    Set to add to
stroom-core-shared/src/main/java/stroom/explorer/shared/NodeFlagGroup.java