本文整理汇总了Java中io.usethesource.capsule.core.PersistentTrieMap类的典型用法代码示例。如果您正苦于以下问题:Java PersistentTrieMap类的具体用法?Java PersistentTrieMap怎么用?Java PersistentTrieMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PersistentTrieMap类属于io.usethesource.capsule.core包,在下文中一共展示了PersistentTrieMap类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TrieMapVarStore
import io.usethesource.capsule.core.PersistentTrieMap; //导入依赖的package包/类
public TrieMapVarStore() {
varStore = PersistentTrieMap.of();
parent = null;
}
示例2: of
import io.usethesource.capsule.core.PersistentTrieMap; //导入依赖的package包/类
static <K, V> Map.Immutable<K, V> of() {
return PersistentTrieMap.of();
}
示例3: getTargetMapClass
import io.usethesource.capsule.core.PersistentTrieMap; //导入依赖的package包/类
public static Class<PersistentTrieMap> getTargetMapClass() {
return targetMapClass;
}
示例4: main
import io.usethesource.capsule.core.PersistentTrieMap; //导入依赖的package包/类
public static void main(String[] args) {
final List<String> results = new LinkedList<>();
for (int exp = 0; exp <= 23; exp += 1) {
final int count = (int) Math.pow(2, exp);
for (int run = 0; run < 5; run++) {
final Set<JmhValue> testSet = setUpTestSetWithRandomContent(count, run);
if (reportSet) {
results.add(measureFootprintOfPersistentChampSet(testSet, count, run,
Optional.of(ValueFactoryFactory.VF_CHAMP.toString()), PersistentTrieSet.class));
results.add(measureFootprintOfPersistentChampSet(testSet, count, run,
Optional.of(ValueFactoryFactory.VF_CHAMP_MEMOIZED.toString()),
TrieSet_5Bits_Memoized_LazyHashCode.class));
// results.add(measureFootprintOfPersistentChampSet(testSet, count, run,
// Optional.of(ValueFactoryFactory.VF_AXIOM.toString()),
// AxiomHashTrieSet.class));
// results.add(measureFootprintOfPersistentChampSet(testSet, count, run,
// Optional.of(ValueFactoryFactory.VF_CHAMP_EXTENDED.toString()),
// PersistentTrieSetExtended.class));
results.add(measureFootprintOfPersistentClojureSet(testSet, count, run,
Optional.of(ValueFactoryFactory.VF_CLOJURE.toString())));
results.add(measureFootprintOfPersistentScalaSet(testSet, count, run,
Optional.of(ValueFactoryFactory.VF_SCALA.toString())));
results.add(measureFootprintOfPersistentScalaStrawmanSet(testSet, count, run,
Optional.of(ValueFactoryFactory.VF_SCALA_STRAWMAN.toString())));
System.out.println();
}
if (reportMap) {
results.add(measureFootprintOfPersistentChampMap(testSet, count, run,
Optional.of(ValueFactoryFactory.VF_CHAMP.toString()), PersistentTrieMap.class));
results.add(measureFootprintOfPersistentChampMap(testSet, count, run,
Optional.of(ValueFactoryFactory.VF_CHAMP_MEMOIZED.toString()),
TrieMap_5Bits_Memoized_LazyHashCode.class));
// results.add(measureFootprintOfPersistentChampMap(testSet, count, run,
// Optional.of(ValueFactoryFactory.VF_AXIOM.toString()),
// AxiomHashTrieMap.class));
// results.add(measureFootprintOfPersistentChampMap(testSet, count, run,
// Optional.of("VF_CHAMP_EXTENDED"),
// PersistentTrieMapExtended.class));
results.add(measureFootprintOfPersistentClojureMap(testSet, count, run,
Optional.of(ValueFactoryFactory.VF_CLOJURE.toString())));
results.add(measureFootprintOfPersistentScalaMap(testSet, count, run,
Optional.of(ValueFactoryFactory.VF_SCALA.toString())));
results.add(measureFootprintOfPersistentScalaStrawmanMap(testSet, count, run,
Optional.of(ValueFactoryFactory.VF_SCALA_STRAWMAN.toString())));
System.out.println();
}
}
}
FootprintUtils.writeToFile(Paths.get("map-sizes-and-statistics.csv"), false, results);
}
示例5: getInstance
import io.usethesource.capsule.core.PersistentTrieMap; //导入依赖的package包/类
@Override
public JmhValueFactory getInstance() {
return new io.usethesource.criterion.impl.persistent.champ.ChampValueFactory(
PersistentTrieSet.class, PersistentTrieMap.class, PersistentTrieSetMultimap.class);
}