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

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

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

MutableSet.notEmpty介绍

暂无

代码示例

代码示例来源:origin: eclipse/eclipse-collections

parallelIterable.split().collect(batch -> completionService.submit(() -> batch.allSatisfy(predicate)), UnifiedSet.newSet());
while (futures.notEmpty())

代码示例来源:origin: eclipse/eclipse-collections

parallelIterable.split().collect(batch -> completionService.submit(() -> batch.anySatisfy(predicate)), UnifiedSet.newSet());
while (futures.notEmpty())

代码示例来源:origin: eclipse/eclipse-collections

parallelIterable.split().collect(batch -> completionService.submit(() -> batch.allSatisfy(predicate)), UnifiedSet.newSet());
while (futures.notEmpty())

代码示例来源:origin: eclipse/eclipse-collections

parallelIterable.split().collect(batch -> completionService.submit(() -> batch.anySatisfy(predicate)), UnifiedSet.newSet());
while (futures.notEmpty())

代码示例来源:origin: eclipse/eclipse-collections

public static void denyContainsAny(
    String collectionName,
    Collection<?> actualCollection,
    Object... items)
{
  try
  {
    Verify.assertNotEmpty("Expected items in assertion", items);
    Verify.assertObjectNotNull(collectionName, actualCollection);
    MutableSet<Object> intersection = Sets.intersect(UnifiedSet.newSet(actualCollection), UnifiedSet.newSetWith(items));
    if (intersection.notEmpty())
    {
      Assert.fail(collectionName
          + " has an intersection with these items and should not :<" + intersection + '>');
    }
  }
  catch (AssertionError e)
  {
    Verify.throwMangledException(e);
  }
}

代码示例来源:origin: org.eclipse.collections/eclipse-collections

parallelIterable.split().collect(batch -> completionService.submit(() -> batch.anySatisfy(predicate)), UnifiedSet.newSet());
while (futures.notEmpty())

代码示例来源:origin: org.eclipse.collections/eclipse-collections

parallelIterable.split().collect(batch -> completionService.submit(() -> batch.allSatisfy(predicate)), UnifiedSet.newSet());
while (futures.notEmpty())

代码示例来源:origin: goldmansachs/obevo

@VisibleForTesting
MutableSet<SchemaObjectRow> getInvalidObjects(Connection conn, RichIterable<PhysicalSchema> physicalSchemas) {
  LOG.info("Checking for invalid objects");
  String schemaInClause = physicalSchemas.collect(new Function<PhysicalSchema, String>() {
    @Override
    public String valueOf(PhysicalSchema physicalSchema) {
      return physicalSchema.getPhysicalName();
    }
  }).makeString("('", "','", "')");
  MutableSet<SchemaObjectRow> oldInvalidObjects = queryOldInvalidObjects(conn, schemaInClause);
  try {
    MutableSet<SchemaObjectRow> newInvalidObjects = queryNewInvalidObjects(conn, schemaInClause);
    if (oldInvalidObjects.isEmpty() && newInvalidObjects.notEmpty()) {
      deployMetricsCollector.addMetric("invalidObjectQuery.resultsOnlyInNew", true);
    } else if (oldInvalidObjects.notEmpty() && newInvalidObjects.isEmpty()) {
      deployMetricsCollector.addMetric("invalidObjectQuery.resultsOnlyInOld", true);
    }
    return oldInvalidObjects.withAll(newInvalidObjects);
  } catch (DataAccessException e) {
    deployMetricsCollector.addMetric("oldInvalidObjectQueryRequired", true);
    LOG.debug("Failed to execute new invalid objects SQL; falling back to old query");
    return oldInvalidObjects;
  }
}

代码示例来源:origin: com.goldmansachs.obevo/obevo-db-db2

@VisibleForTesting
MutableSet<SchemaObjectRow> getInvalidObjects(Connection conn, RichIterable<PhysicalSchema> physicalSchemas) {
  LOG.info("Checking for invalid objects");
  String schemaInClause = physicalSchemas.collect(new Function<PhysicalSchema, String>() {
    @Override
    public String valueOf(PhysicalSchema physicalSchema) {
      return physicalSchema.getPhysicalName();
    }
  }).makeString("('", "','", "')");
  MutableSet<SchemaObjectRow> oldInvalidObjects = queryOldInvalidObjects(conn, schemaInClause);
  try {
    MutableSet<SchemaObjectRow> newInvalidObjects = queryNewInvalidObjects(conn, schemaInClause);
    if (oldInvalidObjects.isEmpty() && newInvalidObjects.notEmpty()) {
      deployMetricsCollector.addMetric("invalidObjectQuery.resultsOnlyInNew", true);
    } else if (oldInvalidObjects.notEmpty() && newInvalidObjects.isEmpty()) {
      deployMetricsCollector.addMetric("invalidObjectQuery.resultsOnlyInOld", true);
    }
    return oldInvalidObjects.withAll(newInvalidObjects);
  } catch (DataAccessException e) {
    deployMetricsCollector.addMetric("oldInvalidObjectQueryRequired", true);
    LOG.debug("Failed to execute new invalid objects SQL; falling back to old query");
    return oldInvalidObjects;
  }
}

代码示例来源:origin: org.eclipse.collections/eclipse-collections-testutils

public static void denyContainsAny(
    String collectionName,
    Collection<?> actualCollection,
    Object... items)
{
  try
  {
    Verify.assertNotEmpty("Expected items in assertion", items);
    Verify.assertObjectNotNull(collectionName, actualCollection);
    MutableSet<Object> intersection = Sets.intersect(UnifiedSet.newSet(actualCollection), UnifiedSet.newSetWith(items));
    if (intersection.notEmpty())
    {
      Assert.fail(collectionName
          + " has an intersection with these items and should not :<" + intersection + '>');
    }
  }
  catch (AssertionError e)
  {
    Verify.throwMangledException(e);
  }
}

代码示例来源:origin: com.goldmansachs.obevo/obevo-db

if (replacerSubSchemas.notEmpty()) {
  LazyIterable<Pair<String, String>> pairs = replacerSchemas.cartesianProduct(replacerSubSchemas);
  for (Pair<String, String> pair : pairs) {

代码示例来源:origin: goldmansachs/obevo

if (replacerSubSchemas.notEmpty()) {
  LazyIterable<Pair<String, String>> pairs = replacerSchemas.cartesianProduct(replacerSubSchemas);
  for (Pair<String, String> pair : pairs) {

相关文章

微信公众号

最新文章

更多