Package java.lang

Examples of java.lang.String.matches()


        InputStreamReader read = new InputStreamReader(new FileInputStream(path), "UTF-8");
        BufferedReader in = new BufferedReader(read);
        String s;
        while ((s = in.readLine()) != null){
          s = s.trim();
          if (!s.matches("^$"))
            sWord.add(s);
        }
        in.close();
      }catch (Exception e) {
        System.err.println("停用词文件路径错误");
View Full Code Here


        if(required && (value == null || value.length() == 0)) {
            throw new ModuleException("Illegal parameter: " + name);
        }

        if(regex != null && (value != null && value.length() > 0)) {
            if(!value.matches(regex)) {
                throw new ModuleException("Invalid parameter. name: " + name + ", value: " + value);
            }
        }

        return new ValidModuleParam(data, defaults, name);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.