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

com.alogic.matcher.impl.Wildcard Maven / Gradle / Ivy

There is a newer version: 1.6.17
Show newest version
package com.alogic.matcher.impl;

import com.alogic.matcher.CommonMatcher;
import com.anysoft.util.Properties;
import com.anysoft.util.StringMatcher;

/**
 * 通配符*匹配
 *
 * @since 1.6.12.57 [20200103]
 */
public class Wildcard implements CommonMatcher {

    /**
     * 支持*通配符的StringMatcher
     */
    protected StringMatcher matcher = null;

    public Wildcard(String regex, Properties p){
        matcher = new StringMatcher(regex);
    }

    @Override
    public boolean isMatch(String data) {
        return matcher != null?matcher.match(data):false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy