本文整理了Java中org.eclipse.collections.api.set.MutableSet.clear()
方法的一些代码示例,展示了MutableSet.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MutableSet.clear()
方法的具体详情如下:
包路径:org.eclipse.collections.api.set.MutableSet
类名称:MutableSet
方法名:clear
暂无
代码示例来源:origin: OryxProject/oryx
@Override
public void retainRecentAndIDs(Collection<String> newModelIDs) {
try (AutoLock al = lock.autoWriteLock()) {
vectors.keySet().removeIf(key -> !newModelIDs.contains(key) && !recentIDs.contains(key));
recentIDs.clear();
}
}
代码示例来源:origin: OryxProject/oryx
public void retainRecentAndItemIDs(Collection<String> items) {
Y.retainRecentAndIDs(items);
try (AutoLock al = expectedItemIDsLock.autoWriteLock()) {
expectedItemIDs.clear();
expectedItemIDs.addAll(items);
Y.removeAllIDsFrom(expectedItemIDs);
}
}
代码示例来源:origin: OryxProject/oryx
public void retainRecentAndUserIDs(Collection<String> users) {
X.retainRecentAndIDs(users);
try (AutoLock al = expectedUserIDsLock.autoWriteLock()) {
expectedUserIDs.clear();
expectedUserIDs.addAll(users);
X.removeAllIDsFrom(expectedUserIDs);
}
}
代码示例来源:origin: OryxProject/oryx
/**
* Retains only items that are expected to appear
* in the upcoming model updates, or, that have arrived recently. This also clears the
* recent known items data structure.
*
* @param items items that should be retained, which are coming in the new model updates
*/
void retainRecentAndItemIDs(Collection<String> items) {
Y.retainRecentAndIDs(items);
try (AutoLock al = expectedItemIDsLock.autoWriteLock()) {
expectedItemIDs.clear();
expectedItemIDs.addAll(items);
Y.removeAllIDsFrom(expectedItemIDs);
}
}
代码示例来源:origin: OryxProject/oryx
/**
* Retains only users that are expected to appear
* in the upcoming model updates, or, that have arrived recently. This also clears the
* recent known users data structure.
*
* @param users users that should be retained, which are coming in the new model updates
*/
void retainRecentAndUserIDs(Collection<String> users) {
X.retainRecentAndIDs(users);
try (AutoLock al = expectedUserIDsLock.autoWriteLock()) {
expectedUserIDs.clear();
expectedUserIDs.addAll(users);
X.removeAllIDsFrom(expectedUserIDs);
}
}
代码示例来源:origin: com.cloudera.oryx/oryx-app-common
@Override
public void retainRecentAndIDs(Collection<String> newModelIDs) {
try (AutoLock al = lock.autoWriteLock()) {
vectors.keySet().removeIf(key -> !newModelIDs.contains(key) && !recentIDs.contains(key));
recentIDs.clear();
}
}
代码示例来源:origin: com.cloudera.oryx/oryx-app
public void retainRecentAndUserIDs(Collection<String> users) {
X.retainRecentAndIDs(users);
try (AutoLock al = expectedUserIDsLock.autoWriteLock()) {
expectedUserIDs.clear();
expectedUserIDs.addAll(users);
X.removeAllIDsFrom(expectedUserIDs);
}
}
代码示例来源:origin: com.cloudera.oryx/oryx-app
public void retainRecentAndItemIDs(Collection<String> items) {
Y.retainRecentAndIDs(items);
try (AutoLock al = expectedItemIDsLock.autoWriteLock()) {
expectedItemIDs.clear();
expectedItemIDs.addAll(items);
Y.removeAllIDsFrom(expectedItemIDs);
}
}
内容来源于网络,如有侵权,请联系作者删除!