public class KeyGroupRange extends Object implements KeyGroupsList, Serializable
限定符和类型 | 字段和说明 |
---|---|
static KeyGroupRange |
EMPTY_KEY_GROUP_RANGE
The empty key-group
|
构造器和说明 |
---|
KeyGroupRange(int startKeyGroup,
int endKeyGroup)
Defines the range [startKeyGroup, endKeyGroup]
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
contains(int keyGroup)
Checks whether or not a single key-group is contained in the range.
|
boolean |
equals(Object o) |
int |
getEndKeyGroup() |
KeyGroupRange |
getIntersection(KeyGroupRange other)
Create a range that represent the intersection between this range and the given range.
|
int |
getKeyGroupId(int idx)
Returns the id of the keygroup at the given index, where index in interval [0,
KeyGroupsList.getNumberOfKeyGroups() [. |
int |
getNumberOfKeyGroups()
Returns the number of key group ids in the list.
|
int |
getStartKeyGroup() |
int |
hashCode() |
Iterator<Integer> |
iterator() |
static KeyGroupRange |
of(int startKeyGroup,
int endKeyGroup)
Factory method that also handles creation of empty key-groups.
|
String |
toString() |
forEach, spliterator
public static final KeyGroupRange EMPTY_KEY_GROUP_RANGE
public KeyGroupRange(int startKeyGroup, int endKeyGroup)
startKeyGroup
- start of the range (inclusive)endKeyGroup
- end of the range (inclusive)public boolean contains(int keyGroup)
contains
在接口中 KeyGroupsList
keyGroup
- Key-group to check for inclusion.public KeyGroupRange getIntersection(KeyGroupRange other)
other
- A KeyGroupRange to intersect.public int getNumberOfKeyGroups()
KeyGroupsList
getNumberOfKeyGroups
在接口中 KeyGroupsList
public int getStartKeyGroup()
public int getEndKeyGroup()
public int getKeyGroupId(int idx)
KeyGroupsList
KeyGroupsList.getNumberOfKeyGroups()
[.getKeyGroupId
在接口中 KeyGroupsList
idx
- the index into the listpublic static KeyGroupRange of(int startKeyGroup, int endKeyGroup)
startKeyGroup
- start of the range (inclusive)endKeyGroup
- end of the range (inclusive)Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.