當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。