All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.iprogrammerr.bright.server.rule.ListOfRequestMethodRule Maven / Gradle / Ivy

package com.iprogrammerr.bright.server.rule;

import com.iprogrammerr.bright.server.method.RequestMethod;

public final class ListOfRequestMethodRule implements RequestMethodRule {

    private final RequestMethod[] requestMethods;

    public ListOfRequestMethodRule(RequestMethod... requestMethods) {
	this.requestMethods = requestMethods;
    }

    @Override
    public boolean compliant(String requestMethod) {
	for (RequestMethod method : requestMethods) {
	    if (method.is(requestMethod)) {
		return true;
	    }
	}
	return false;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy