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

org.mockserver.model.Parameters Maven / Gradle / Ivy

package org.mockserver.model;

import com.google.common.collect.Multimap;

import java.util.Collection;
import java.util.List;

/**
 * @author jamesdbloom
 */
public class Parameters extends KeysToMultiValues {

    private String rawParameterString;

    public Parameters(List parameters) {
        withEntries(parameters);
    }

    public Parameters(Parameter... parameters) {
        withEntries(parameters);
    }

    public Parameters(Multimap headers) {
        super(headers);
    }

    public static Parameters parameters(Parameter... parameters) {
        return new Parameters(parameters);
    }

    @Override
    public Parameter build(NottableString name, Collection values) {
        return new Parameter(name, values);
    }

    public Parameters withKeyMatchStyle(KeyMatchStyle keyMatchStyle) {
        super.withKeyMatchStyle(keyMatchStyle);
        return this;
    }

    public String getRawParameterString() {
        return rawParameterString;
    }

    public Parameters withRawParameterString(String rawParameterString) {
        this.rawParameterString = rawParameterString;
        return this;
    }

    public Parameters clone() {
        return new Parameters(getMultimap())
            .withRawParameterString(rawParameterString);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy