本文整理匯總了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);
}