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

org.mockserver.matchers.IntegerMatcher Maven / Gradle / Ivy

There is a newer version: 5.15.0
Show newest version
package org.mockserver.matchers;

/**
 * @author jamesdbloom
 */
public class IntegerMatcher extends BodyMatcher implements Matcher {
    private final Integer matcher;

    public IntegerMatcher(Integer matcher) {
        this.matcher = matcher;
    }

    public boolean matches(Integer matched) {
        boolean result = false;

        if (matcher == null) {
            result = true;
        } else if (matched != null) {
            result = matcher.equals(matched);
        }

        if (!result) {
            logger.trace("Failed to match [{}] with [{}]", matched, this.matcher);
        }
        return result;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy