Microsoft SDK for Java

compareBooleans

This method of the PermissionUtils Class compares two booleans. Each boolean represents access to resources that are independent of the other resources of the permissions.

Syntax

public static int compareBooleans(boolean f1, boolean f2, int prevcmp);

Return Value

Returns a new comparison result, merged with the previous comparison result using mergeComparisonResults.

Boolean Comparisons

f1 f2 Result before merging
true true SetComparison.EQUAL
true false SetComparison.EMPTY_SUPERSET
false true SetComparison.EMPTY_SUBSET
false false SetComparison.EMPTY

Parameters

f1 If true, access to the resource in the first permission is granted; otherwise, access is denied.
f2 If true, access to the resource in the second permission is granted; otherwise, access is denied.
prevcmp A previous comparison result for other resources of the permissions. For the first resource of a permission, this is typically SetComparison.EMPTY.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.