io.vertx.mutiny.ext.web.validation.RequestPredicate Maven / Gradle / Ivy
The newest version!
package io.vertx.mutiny.ext.web.validation;
import java.util.Map;
import java.util.stream.Collectors;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import io.smallrye.mutiny.vertx.TypeArg;
import io.vertx.codegen.annotations.Fluent;
import io.smallrye.common.annotation.CheckReturnValue;
import java.util.function.Function;
/**
* Request predicate
*
*
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.web.validation.RequestPredicate original} non Mutiny-ified interface using Vert.x codegen.
*/
@io.smallrye.mutiny.vertx.MutinyGen(io.vertx.ext.web.validation.RequestPredicate.class)
public class RequestPredicate implements java.util.function.Function {
public static final io.smallrye.mutiny.vertx.TypeArg __TYPE_ARG = new io.smallrye.mutiny.vertx.TypeArg<>( obj -> new RequestPredicate((io.vertx.ext.web.validation.RequestPredicate) obj),
RequestPredicate::getDelegate
);
private final io.vertx.ext.web.validation.RequestPredicate delegate;
public RequestPredicate(io.vertx.ext.web.validation.RequestPredicate delegate) {
this.delegate = delegate;
}
public RequestPredicate(Object delegate) {
this.delegate = (io.vertx.ext.web.validation.RequestPredicate)delegate;
}
/**
* Empty constructor used by CDI, do not use this constructor directly.
**/
RequestPredicate() {
this.delegate = null;
}
public io.vertx.ext.web.validation.RequestPredicate getDelegate() {
return delegate;
}
@Override
public String toString() {
return delegate.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
RequestPredicate that = (RequestPredicate) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
@Override
public io.vertx.mutiny.ext.web.validation.RequestPredicateResult apply(io.vertx.mutiny.ext.web.RoutingContext in) {
io.vertx.ext.web.validation.RequestPredicateResult ret;
ret = getDelegate().apply(in.getDelegate());
java.util.function.Function outConv = io.vertx.mutiny.ext.web.validation.RequestPredicateResult::newInstance;
return outConv.apply(ret);
}
/**
* @param propertyName
* @param contentTypePattern
* @return
*/
public static io.vertx.mutiny.ext.web.validation.RequestPredicate multipartFileUploadExists(String propertyName, String contentTypePattern) {
io.vertx.mutiny.ext.web.validation.RequestPredicate ret = io.vertx.mutiny.ext.web.validation.RequestPredicate.newInstance((io.vertx.ext.web.validation.RequestPredicate)io.vertx.ext.web.validation.RequestPredicate.multipartFileUploadExists(propertyName, contentTypePattern));
return ret;
}
/**
* Request predicate that checks if body exists or not
*/
public static final io.vertx.mutiny.ext.web.validation.RequestPredicate BODY_REQUIRED = io.vertx.mutiny.ext.web.validation.RequestPredicate.newInstance((io.vertx.ext.web.validation.RequestPredicate)io.vertx.ext.web.validation.RequestPredicate.BODY_REQUIRED);
public static RequestPredicate newInstance(io.vertx.ext.web.validation.RequestPredicate arg) {
return arg != null ? new RequestPredicate(arg) : null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy