本文整理汇总了Java中java.util.concurrent.ConcurrentMap.size方法的典型用法代码示例。如果您正苦于以下问题:Java ConcurrentMap.size方法的具体用法?Java ConcurrentMap.size怎么用?Java ConcurrentMap.size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.util.concurrent.ConcurrentMap
的用法示例。
在下文中一共展示了ConcurrentMap.size方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEventProperty
import java.util.concurrent.ConcurrentMap; //导入方法依赖的package包/类
/**
* obtains desired property from a single event block.
* Method signature is suitable for RgxGrouper function
*/
public static String getEventProperty(String input, ConcurrentMap<RegExp, Pattern> eventPatterns,
ConcurrentMap<RegExp, List<String>> cleanProps, ConcurrentMap<RegExp, List<String>> groupProps) {
RegExp foundEvent = anyMatch(input, eventPatterns);
if (foundEvent == null)
return input;
if (cleanProps.size() > 0)
input = cleanEventProperty(input, foundEvent, cleanProps);
List<String> propsRgx = groupProps.get(foundEvent);
if (propsRgx == null)
return input;
List<String> receivedProps = new ArrayList<>(5);
for (String currRgx : propsRgx) {
Pattern pattern = Pattern.compile(currRgx, Pattern.DOTALL);
Matcher matcher = pattern.matcher(input);
if (matcher.find())
receivedProps.add(matcher.group());
}
return String.join(",", receivedProps);
}