当前位置: 首页>>代码示例>>Java>>正文


Java Multimaps.filterKeys方法代码示例

本文整理汇总了Java中com.google.common.collect.Multimaps.filterKeys方法的典型用法代码示例。如果您正苦于以下问题:Java Multimaps.filterKeys方法的具体用法?Java Multimaps.filterKeys怎么用?Java Multimaps.filterKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.common.collect.Multimaps的用法示例。


在下文中一共展示了Multimaps.filterKeys方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: copyFiltered

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
public EventArgScoringAlignment<EquivClassType> copyFiltered(
    final Predicate<EquivClassType> filter) {
  return new EventArgScoringAlignment<EquivClassType>(docID(), argumentOutput, answerKey,
      Iterables.filter(truePositiveECs, filter),
      Iterables.filter(falsePositiveECs, filter),
      Iterables.filter(falseNegativeECs, filter),
      Iterables.filter(unassessed, filter),
      Multimaps.filterKeys(ecsToAnswerKey, filter),
      Multimaps.filterKeys(ecsToSystem, filter));
}
 
开发者ID:isi-nlp,项目名称:tac-kbp-eal,代码行数:11,代码来源:EventArgScoringAlignment.java

示例2: awaitHealthy

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitHealthy(long timeout, TimeUnit unit) throws TimeoutException {
  monitor.enter();
  try {
    if (!monitor.waitForUninterruptibly(awaitHealthGuard, timeout, unit)) {
      throw new TimeoutException(
          "Timeout waiting for the services to become healthy. The "
              + "following services have not started: "
              + Multimaps.filterKeys(servicesByState, in(ImmutableSet.of(NEW, STARTING))));
    }
    checkHealthy();
  } finally {
    monitor.leave();
  }
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:15,代码来源:ServiceManager.java

示例3: awaitStopped

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
  monitor.enter();
  try {
    if (!monitor.waitForUninterruptibly(stoppedGuard, timeout, unit)) {
      throw new TimeoutException(
          "Timeout waiting for the services to stop. The following "
              + "services have not stopped: "
              + Multimaps.filterKeys(servicesByState, not(in(EnumSet.of(TERMINATED, FAILED)))));
    }
  } finally {
    monitor.leave();
  }
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:14,代码来源:ServiceManager.java

示例4: checkHealthy

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
@GuardedBy("monitor")
void checkHealthy() {
  if (states.count(RUNNING) != numberOfServices) {
    IllegalStateException exception =
        new IllegalStateException(
            "Expected to be healthy after starting. The following services are not running: "
                + Multimaps.filterKeys(servicesByState, not(equalTo(RUNNING))));
    throw exception;
  }
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:11,代码来源:ServiceManager.java

示例5: awaitHealthy

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitHealthy(long timeout, TimeUnit unit) throws TimeoutException {
      monitor.enter();
      try {
        if (!monitor.waitForUninterruptibly(awaitHealthGuard, timeout, unit)) {
          throw new TimeoutException(
            "Timeout waiting for the services to become healthy. The "
+ "following services have not started: " + Multimaps.filterKeys(servicesByState, in(ImmutableSet.of(NEW, STARTING))));
        }
        checkHealthy();
      } finally {
        monitor.leave();
      }
    }
 
开发者ID:antlr,项目名称:codebuff,代码行数:14,代码来源:ServiceManager.java

示例6: awaitStopped

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
      monitor.enter();
      try {
        if (!monitor.waitForUninterruptibly(stoppedGuard, timeout, unit)) {
          throw new TimeoutException(
            "Timeout waiting for the services to stop. The following "
+ "services have not stopped: " + Multimaps.filterKeys(servicesByState, not(in(EnumSet.of(TERMINATED, FAILED)))));
        }
      } finally {
        monitor.leave();
      }
    }
 
开发者ID:antlr,项目名称:codebuff,代码行数:13,代码来源:ServiceManager.java

示例7: checkHealthy

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
@GuardedBy("monitor")
void checkHealthy() {
  if (states.count(RUNNING) != numberOfServices) {
    IllegalStateException exception = new IllegalStateException("Expected to be healthy after starting. The following services are not running: " + Multimaps.filterKeys(servicesByState, not(equalTo(RUNNING))));
    throw exception;
  }
}
 
开发者ID:antlr,项目名称:codebuff,代码行数:8,代码来源:ServiceManager.java

示例8: awaitHealthy

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitHealthy(long timeout, TimeUnit unit) throws TimeoutException {
  monitor.enter();
  try {
    if (!monitor.waitForUninterruptibly(awaitHealthGuard, timeout, unit)) {
      throw new TimeoutException("Timeout waiting for the services to become healthy. The "
      + "following services have not started: " + Multimaps.filterKeys(servicesByState, in(ImmutableSet.of(NEW, STARTING))));
    }
    checkHealthy();
  } finally {
    monitor.leave();
  }
}
 
开发者ID:antlr,项目名称:codebuff,代码行数:13,代码来源:ServiceManager.java

示例9: awaitStopped

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
  monitor.enter();
  try {
    if (!monitor.waitForUninterruptibly(stoppedGuard, timeout, unit)) {
      throw new TimeoutException("Timeout waiting for the services to stop. The following "
      + "services have not stopped: " + Multimaps.filterKeys(servicesByState, not(in(EnumSet.of(TERMINATED, FAILED)))));
    }
  } finally {
    monitor.leave();
  }
}
 
开发者ID:antlr,项目名称:codebuff,代码行数:12,代码来源:ServiceManager.java

示例10: awaitHealthy

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitHealthy(long timeout, TimeUnit unit) throws TimeoutException {
  monitor.enter();
  try {
    if (!monitor.waitForUninterruptibly(awaitHealthGuard, timeout, unit)) {
      throw new TimeoutException(
        "Timeout waiting for the services to become healthy. The "
        + "following services have not started: " + Multimaps.filterKeys(servicesByState, in(ImmutableSet.of(NEW, STARTING))));
    }
    checkHealthy();
  } finally {
    monitor.leave();
  }
}
 
开发者ID:antlr,项目名称:codebuff,代码行数:14,代码来源:ServiceManager.java

示例11: awaitStopped

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
  monitor.enter();
  try {
    if (!monitor.waitForUninterruptibly(stoppedGuard, timeout, unit)) {
      throw new TimeoutException(
        "Timeout waiting for the services to stop. The following "
        + "services have not stopped: " + Multimaps.filterKeys(servicesByState, not(in(EnumSet.of(TERMINATED, FAILED)))));
    }
  } finally {
    monitor.leave();
  }
}
 
开发者ID:antlr,项目名称:codebuff,代码行数:13,代码来源:ServiceManager.java

示例12: determineDuplicatedTrades

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
private Multimap<String, String> determineDuplicatedTrades() {
  return Multimaps.filterKeys(_invertedPositions,
      new Predicate<String>() {
        @Override
        public boolean apply(String s) {
          return _invertedPositions.get(s).size() > 1;
        }
      }
  );
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:11,代码来源:TradePositionResolver.java

示例13: awaitHealthy

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitHealthy(long timeout, TimeUnit unit) throws TimeoutException {
  monitor.enter();
  try {
    if (!monitor.waitForUninterruptibly(awaitHealthGuard, timeout, unit)) {
      throw new TimeoutException("Timeout waiting for the services to become healthy. The "
          + "following services have not started: "
          + Multimaps.filterKeys(servicesByState, in(ImmutableSet.of(NEW, STARTING))));
    }
    checkHealthy();
  } finally {
    monitor.leave();
  }
}
 
开发者ID:sander120786,项目名称:guava-libraries,代码行数:14,代码来源:ServiceManager.java

示例14: awaitStopped

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
  monitor.enter();
  try {
    if (!monitor.waitForUninterruptibly(stoppedGuard, timeout, unit)) {
      throw new TimeoutException("Timeout waiting for the services to stop. The following "
          + "services have not stopped: "
          + Multimaps.filterKeys(servicesByState,
              not(in(EnumSet.of(TERMINATED, FAILED)))));
    }
  } finally {
    monitor.leave();
  }
}
 
开发者ID:sander120786,项目名称:guava-libraries,代码行数:14,代码来源:ServiceManager.java

示例15: checkHealthy

import com.google.common.collect.Multimaps; //导入方法依赖的package包/类
@GuardedBy("monitor")
void checkHealthy() {
  if (states.count(RUNNING) != numberOfServices) {
    IllegalStateException exception = new IllegalStateException(
        "Expected to be healthy after starting. The following services are not running: "
            + Multimaps.filterKeys(servicesByState, not(equalTo(RUNNING))));
    throw exception;
  }
}
 
开发者ID:sander120786,项目名称:guava-libraries,代码行数:10,代码来源:ServiceManager.java


注:本文中的com.google.common.collect.Multimaps.filterKeys方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。