org.mockserver.matchers.IntegerMatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockserver-core Show documentation
Show all versions of mockserver-core Show documentation
Functionality used by all MockServer modules for matching and expectations
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