public interface Grouped
| 限定符和类型 | 方法和说明 |
|---|---|
static Predicate<Grouped> |
allMatch(String... groups)
The object belongs to all the groups in
groups, for example:
input test result
[ ] any true
[a] [a] true
[a] [a, b]false
[a, b] [a, b]true
[a, b] [b] false
|
static Predicate<Grouped> |
alwaysMatch()
Objects always belong to any group.
|
static Predicate<Grouped> |
alwaysNoneMatch()
The object always does not belong to any group.
|
static Predicate<Grouped> |
anyMatch(String... groups)
The object belongs to any group in
groups, for example:
input test result
[ ] any false
[a, b] [a, b]true
[a, b] [a] true
[a, b] [c] false
|
default Set<String> |
getGroups()
Get group names.
|
default boolean |
isBelong(String group)
Whether the current object belongs to the specified group.
|
static Predicate<Grouped> |
noneMatch(String... groups)
The object does not belong to any group in
groups, for example:
input test result
[ ] any true
[a, b] [a, b]false
[a, b] [a] false
[a, b] [c] true
|
static Predicate<Grouped> allMatch(String... groups)
The object belongs to all the groups in groups, for example:
| input | test | result |
| [ ] | any | true |
| [a] | [a] | true |
| [a] | [a, b] | false |
| [a, b] | [a, b] | true |
| [a, b] | [b] | false |
groups - groupsstatic Predicate<Grouped> noneMatch(String... groups)
The object does not belong to any group in groups, for example:
| input | test | result |
| [ ] | any | true |
| [a, b] | [a, b] | false |
| [a, b] | [a] | false |
| [a, b] | [c] | true |
groups - groupsstatic Predicate<Grouped> anyMatch(String... groups)
The object belongs to any group in groups, for example:
| input | test | result |
| [ ] | any | false |
| [a, b] | [a, b] | true |
| [a, b] | [a] | true |
| [a, b] | [c] | false |
groups - groupsstatic Predicate<Grouped> alwaysMatch()
static Predicate<Grouped> alwaysNoneMatch()
default boolean isBelong(String group)
group - groupCopyright © 2024. All rights reserved.