本文整理匯總了Java中org.pcollections.HashPMap類的典型用法代碼示例。如果您正苦於以下問題:Java HashPMap類的具體用法?Java HashPMap怎麽用?Java HashPMap使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
HashPMap類屬於org.pcollections包,在下文中一共展示了HashPMap類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateAcknowledgedTSNS
import org.pcollections.HashPMap; //導入依賴的package包/類
/**
* @param gaps retrieved gaps
* @param duplicates TODO not sure what to do with these
*/
public void updateAcknowledgedTSNS(
long cumulativeTsnAck,
List<SackUtil.GapAck> gaps,
List<Long> duplicates) {
final HashPMap<Long,TimeData> sent = sentTSNS;
logger.debug("Before removal contains: " + sent);
logger.debug("Updating acks with cumulative " + cumulativeTsnAck + " and gaps " + gaps );
/**
* Filter and remove those with TSN below cumulativeTsnAck.
*/
final Collection<Long> ls = sent.keySet().stream()
.filter(j -> j <= cumulativeTsnAck).collect(Collectors.toSet());
synchronized (dataMutex) {
sentTSNS = sentTSNS.minusAll(ls);
}
removeAllAcknowledged(cumulativeTsnAck,gaps);
logger.debug("After remove it contains: " + sentTSNS);
}
示例2: PcollectionsMap
import org.pcollections.HashPMap; //導入依賴的package包/類
protected PcollectionsMap(HashPMap<JmhValue, JmhValue> content) {
this.content = content;
}