This method of the PermissionUtils Class compares two booleans that represent inclusive access to resources. A boolean value of false means that access to resources can be granted; a value of true means that more resources will be granted. Typically, this comparator is used only when the possession of the permission itself has meaning, because it becomes impossible to determine DISJOINT or EMPTY permissions after use of this comparator.
public static int compareInclusiveBooleans(boolean f1, boolean f2, int prevcmp);
Returns a new comparison result, merged with the previous comparison result using mergeComparisonResults.
f1 | f2 | Result before merging |
true | true | SetComparison.EQUAL |
true | false | SetComparison.SUPERSET |
false | true | SetComparison.SUBSET |
false | false | SetComparison.EQUAL |
f1 | A flag that specifies the type of access to the resource in the first permission. If false, access to the resource is not denied; if true, more privileged access to the resource is granted. |
f2 | A flag that specifies the type of access to the resource in the second permission. If false, access to the resource is not denied; if true, more privileged access to the resource is granted. |
prevcmp | A previous comparison result for other resources of the permissions. For the first resource of a permission, this is typically SetComparison.EMPTY. |