/** * Negate the logical operator. * @return a {@link BooleanSpec} to be used to add logical operators */ public BooleanSpec negate() { this.routeBuilder.negate(); return new BooleanSpec(routeBuilder, builder); }
public BooleanSpec asyncPredicate(AsyncPredicate<ServerWebExchange> predicate) { this.routeBuilder.asyncPredicate(predicate); return new BooleanSpec(this.routeBuilder, this.builder); }
@Override public BooleanSpec asyncPredicate(AsyncPredicate<ServerWebExchange> predicate) { switch (this.operator) { case AND: this.routeBuilder.and(predicate); break; case OR: this.routeBuilder.or(predicate); break; case NEGATE: this.routeBuilder.negate(); } return new BooleanSpec(this.routeBuilder, this.builder); } }