org.eclipse.collections.api.set.MutableSet.clear()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(141)

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

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);
 }
}

相关文章

微信公众号

最新文章

更多