Package com.google.gerrit.entities
Class PermissionRange
java.lang.Object
com.google.gerrit.entities.PermissionRange
- All Implemented Interfaces:
Comparable<PermissionRange>
- Direct Known Subclasses:
PermissionRange.WithDefaults
Represents a closed interval [min, max] with a name. The special value [0, 0] is understood to be
the empty range.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
name
-
min
protected int min -
max
protected int max
-
-
Constructor Details
-
PermissionRange
protected PermissionRange() -
PermissionRange
-
-
Method Details
-
getName
-
isLabel
public boolean isLabel() -
getLabel
-
getMin
public int getMin() -
getMax
public int getMax() -
contains
public boolean contains(int value) True if the value is within the range. -
squash
public int squash(int value) Normalize the value to fit within the bounds of the range. -
isEmpty
public boolean isEmpty() -
compareTo
- Specified by:
compareTo
in interfaceComparable<PermissionRange>
-
toString
-