public static DocumentPermission highest(final DocumentPermission perm1,
                                             final DocumentPermission perm2) {
        if (perm1 == null) {
            return perm2;
        } else if (perm2 == null) {
            return perm1;
        } else if (perm1.primitiveValue > perm2.primitiveValue) {
            return perm1;
        } else {
            return perm2;
        }
    }
@return The highest permission. Copes with nulls.
stroom-core-shared/src/main/java/stroom/security/shared/DocumentPermission.java