jodd.util.Wildcard.matchTokens()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中jodd.util.Wildcard.matchTokens()方法的一些代码示例,展示了Wildcard.matchTokens()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wildcard.matchTokens()方法的具体详情如下:
包路径:jodd.util.Wildcard
类名称:Wildcard
方法名:matchTokens

Wildcard.matchTokens介绍

[英]Match tokenized string and pattern.
[中]匹配标记化字符串和模式。

代码示例

代码示例来源:origin: redisson/redisson

/**
 * Matches path against pattern using *, ? and ** wildcards.
 * Both path and the pattern are tokenized on path separators (both \ and /).
 * '**' represents deep tree wildcard, as in Ant.
 */
public static boolean matchPath(String path, String pattern) {
  String[] pathElements = StringUtil.splitc(path, PATH_SEPARATORS);
  String[] patternElements = StringUtil.splitc(pattern, PATH_SEPARATORS);
  return matchTokens(pathElements, patternElements);
}

代码示例来源:origin: oblac/jodd

/**
 * Matches path against pattern using *, ? and ** wildcards.
 * Both path and the pattern are tokenized on path separators (both \ and /).
 * '**' represents deep tree wildcard, as in Ant.
 */
public static boolean matchPath(final String path, final String pattern) {
  String[] pathElements = StringUtil.splitc(path, PATH_SEPARATORS);
  String[] patternElements = StringUtil.splitc(pattern, PATH_SEPARATORS);
  return matchTokens(pathElements, patternElements);
}

代码示例来源:origin: org.jodd/jodd-core

/**
 * Matches path against pattern using *, ? and ** wildcards.
 * Both path and the pattern are tokenized on path separators (both \ and /).
 * '**' represents deep tree wildcard, as in Ant.
 */
public static boolean matchPath(final String path, final String pattern) {
  String[] pathElements = StringUtil.splitc(path, PATH_SEPARATORS);
  String[] patternElements = StringUtil.splitc(pattern, PATH_SEPARATORS);
  return matchTokens(pathElements, patternElements);
}

代码示例来源:origin: fivesmallq/web-data-extractor

/**
 * Matches path against pattern using *, ? and ** wildcards.
 * Both path and the pattern are tokenized on path separators (both \ and /).
 * '**' represents deep tree wildcard, as in Ant.
 */
public static boolean matchPath(String path, String pattern) {
  String[] pathElements = StringUtil.splitc(path, PATH_SEPARATORS);
  String[] patternElements = StringUtil.splitc(pattern, PATH_SEPARATORS);
  return matchTokens(pathElements, patternElements);
}

相关文章