public static void validateFlag(final NodeFlag flag, final Set<NodeFlag> flags) {
        if (flag != null && NullSafe.hasItems(flags)) {
            final Set<NodeFlag> incompatibleFlags = INCOMPATIBLE_FLAGS.get(flag);
            if (NullSafe.hasItems(incompatibleFlags)) {
                for (final NodeFlag incompatibleFlag : incompatibleFlags) {
                    if (flags.contains(incompatibleFlag)) {
                        throw new RuntimeException(flag + " is incompatible with "
                                + incompatibleFlag + " in " + flags);
                    }
                }
            }
        }
    }
Check whether flag is incompatible with any flags in flags.
stroom-core-shared/src/main/java/stroom/explorer/shared/NodeFlag.java