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

org.fluentlenium.core.filter.matcher.EndsWithMatcher Maven / Gradle / Ivy

package org.fluentlenium.core.filter.matcher;

import java.util.regex.Pattern;

/**
 * Matcher checking that actual ends with input value.
 */
public class EndsWithMatcher extends AbstractMatcher {

    /**
     * Creates a ends with matcher.
     *
     * @param value input value
     */
    public EndsWithMatcher(String value) {
        super(value);
    }

    /**
     * Creates a ends with matcher.
     *
     * @param value input value
     */
    public EndsWithMatcher(Pattern value) {
        super(value);
    }

    @Override
    public MatcherType getMatcherType() {
        return MatcherType.ENDS_WITH;
    }

    @Override
    public boolean isSatisfiedBy(String currentValue) {
        return CalculateService.endsWith(getPattern(), getValue(), currentValue);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy