19 package org.turro.action.queue;
21 import java.util.Collection;
22 import java.util.Collections;
23 import java.util.HashSet;
24 import java.util.List;
33 super(c ==
null ? Collections.EMPTY_LIST : c);
53 return hasRequired() ? keys.containsAll(required()) :
true;
57 return hasOptional() ? optional().stream().anyMatch(keys::contains) :
true;
66 private boolean hasRequired() {
67 return stream().anyMatch(nc -> !nc.isOptional());
70 private List<String> required() {
71 return stream().filter(nc -> !nc.isOptional())
72 .map(nc -> nc.getKeyId())
76 private boolean hasOptional() {
77 return stream().anyMatch(nc -> nc.isOptional());
80 private List<String> optional() {
81 return stream().filter(nc -> nc.isOptional())
82 .map(nc -> nc.getKeyId())
boolean wideBond(String... key)
boolean meetRequired(List< String > keys)
NotificationConstraintSet(Collection<? extends NotificationConstraint > c)
boolean strongBond(ConstraintKeys keys)
boolean wideBond(ConstraintKeys keys)
boolean meetOptionals(List< String > keys)
boolean strongBond(String... key)