This method of the PermissionUtils Class compares two positive numerical limits. A higher value is considered more privileged.
public static int compareLimits(long limit1, long limit2, int prevcmp);
Returns a new comparison result, merged with the previous comparison result using mergeComparisonResults.
limit1 | limit2 | Result before merging |
0 | 0 | SetComparison.EMPTY |
>0 | 0 | SetComparison.EMPTY_SUPERSET |
0 | >0 | SetComparison.EMPTY_SUBSET |
>limit2 | >0 | SetComparison.SUPERSET |
>0 | >limit1 | SetComparison.SUBSET |
=limit2 | =limit1 | SetComparison.EQUAL |
limit1 | The first numerical limit. |
limit2 | The second numerical limit. |
prevcmp | A previous comparison result. |