public class PermissionRange extends Object implements Comparable<PermissionRange>
Modifier and Type | Class and Description |
---|---|
static class |
PermissionRange.WithDefaults |
Modifier and Type | Field and Description |
---|---|
protected int |
max |
protected int |
min |
protected String |
name |
Modifier | Constructor and Description |
---|---|
protected |
PermissionRange() |
|
PermissionRange(String name,
int min,
int max) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PermissionRange o) |
boolean |
contains(int value)
True if the value is within the range.
|
String |
getLabel() |
int |
getMax() |
int |
getMin() |
String |
getName() |
boolean |
isEmpty()
|
boolean |
isLabel() |
int |
squash(int value)
Normalize the value to fit within the bounds of the range.
|
String |
toString() |
protected String name
protected int min
protected int max
protected PermissionRange()
public PermissionRange(String name, int min, int max)
public String getName()
public boolean isLabel()
public String getLabel()
public int getMin()
public int getMax()
public boolean contains(int value)
public int squash(int value)
public boolean isEmpty()
public int compareTo(PermissionRange o)
compareTo
in interface Comparable<PermissionRange>