本文整理汇总了Java中com.google.common.collect.MapMaker.makeMap方法的典型用法代码示例。如果您正苦于以下问题:Java MapMaker.makeMap方法的具体用法?Java MapMaker.makeMap怎么用?Java MapMaker.makeMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.common.collect.MapMaker
的用法示例。
在下文中一共展示了MapMaker.makeMap方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SimpleScoreboardElement
import com.google.common.collect.MapMaker; //导入方法依赖的package包/类
public SimpleScoreboardElement(Plugin plugin, int priority, long updateDelay,
List<FrameSupply> contents) {
this.priority = priority;
this.contents = Lists.newCopyOnWriteArrayList(contents);
this.plugin = plugin;
// forced update delay so that players can be cleaned out // implementation specific
this.updateDelay = updateDelay > 0 ? updateDelay : 20L * 10;
this.isTitle = priority < 0;
MapMaker mapMaker = new MapMaker().weakKeys();
this.playerContentsMap = mapMaker.makeMap();
this.cachedContents = mapMaker.makeMap();
Bukkit.getScheduler()
.runTaskTimerAsynchronously(plugin, this::updateAnimations, 1l, this.updateDelay);
}
示例2: ForgeTimeTracker
import com.google.common.collect.MapMaker; //导入方法依赖的package包/类
private ForgeTimeTracker()
{
MapMaker mm = new MapMaker();
mm.weakKeys();
tileEntityTimings = mm.makeMap();
//entityTimings = mm.makeMap();
}
示例3: ForgeTimeTracker
import com.google.common.collect.MapMaker; //导入方法依赖的package包/类
private ForgeTimeTracker()
{
MapMaker mm = new MapMaker();
mm.weakKeys();
tileEntityTimings = mm.makeMap();
entityTimings = mm.makeMap();
}
示例4: makeNodeMap
import com.google.common.collect.MapMaker; //导入方法依赖的package包/类
protected ConcurrentMap<NodeId, ServerNode> makeNodeMap(MapMaker mapMaker) {
return mapMaker.makeMap();
}
示例5: newWeakConcurrentMap
import com.google.common.collect.MapMaker; //导入方法依赖的package包/类
public static <K, V> ConcurrentMap<K, V> newWeakConcurrentMap(int initialCapacity) {
final MapMaker weakMapMaker = createWeakMapMaker();
weakMapMaker.initialCapacity(initialCapacity);
return weakMapMaker.makeMap();
}
示例6: makeNodeMap
import com.google.common.collect.MapMaker; //导入方法依赖的package包/类
protected ConcurrentMap<NodeId, UaNode> makeNodeMap(MapMaker mapMaker) {
return mapMaker.makeMap();
}
示例7: newWeakConcurrentMap
import com.google.common.collect.MapMaker; //导入方法依赖的package包/类
public static <K, V> ConcurrentMap<K, V> newWeakConcurrentMap() {
MapMaker weakMapMaker = createWeakMapMaker();
return weakMapMaker.makeMap();
}