本文整理匯總了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();
}