当前位置: 首页>>代码示例>>Java>>正文


Java TByteObjectHashMap类代码示例

本文整理汇总了Java中gnu.trove.map.hash.TByteObjectHashMap的典型用法代码示例。如果您正苦于以下问题:Java TByteObjectHashMap类的具体用法?Java TByteObjectHashMap怎么用?Java TByteObjectHashMap使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TByteObjectHashMap类属于gnu.trove.map.hash包,在下文中一共展示了TByteObjectHashMap类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateColumn

import gnu.trove.map.hash.TByteObjectHashMap; //导入依赖的package包/类
private void generateColumn( int x, int z ) {
    this.chunkLock.writeLock().lock();
    try {
        ChunkColumn chunkColumnColumn = new ChunkColumn( x, z, this );
        for ( int i = 0; i < chunkColumnColumn.getSections().length; i++ ) {
            ChunkSection section = new ChunkSection( chunkColumnColumn );
            chunkColumnColumn.getSections()[i] = section;
        }
        this.generator.generate( chunkColumnColumn );
        TByteObjectMap<ChunkColumn> c = this.columns.get( (byte) x );
        if ( c == null ) {
            this.columns.put( (byte) x, c = new TByteObjectHashMap<>() );
        }
        c.put( (byte) z, chunkColumnColumn );
    } finally {
        this.chunkLock.writeLock().unlock();
    }
}
 
开发者ID:lukas81298,项目名称:FlexMC,代码行数:19,代码来源:FlexWorld.java

示例2: register

import gnu.trove.map.hash.TByteObjectHashMap; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public <T extends Message, U extends MessageHandler<T>> void register(Addon addon, Class<T> message, Class<U> handler) {
    if (locked) {
        throw new IllegalStateException(addon.getDescription().getName() + " attempted to register a message after INITIALIZE phase! This is NOT ALLOWED.");
    }
    final TByteObjectHashMap<Class<? extends Message>> discriminators;
    try {
        discriminatorsField.setAccessible(true);
        discriminators = (TByteObjectHashMap<Class<? extends Message>>) discriminatorsField.get(this);
        discriminatorsField.setAccessible(false);
    } catch (IllegalAccessException e) {
        game.getLogger().info("Encountered fatal exception when " + addon.getDescription().getName() + " attempted to register [" + message.getSimpleName() + "]", e);
        return;
    }

    if (discriminators.containsValue(message)) {
        game.getLogger().warn(addon.getDescription().getName() + " attempted to register [" + message + "] twice!");
        return;
    }

    addDiscriminator(discriminators.size() == 0 ? 0 : discriminators.size() + 1, message);

    if (handler != null) {
        handlers.put(message, handler);
        game.getLogger().info(addon.getDescription().getName() + " has registered message [" + message.getSimpleName() + "] with handler [" + handler.getSimpleName() + "] in the pipeline");
    } else {
        game.getLogger().info(addon.getDescription().getName() + " has registered message [" + message.getSimpleName() + "] with no handler in the pipeline");
    }
}
 
开发者ID:ObsidianBox,项目名称:Obsidian,代码行数:31,代码来源:CommonMessagePipeline.java

示例3: TroveByteIndexedCollection

import gnu.trove.map.hash.TByteObjectHashMap; //导入依赖的package包/类
/**
 * Constructor which specifies the index's key.
 * 
 * @param keyDefinition
 *            the {@code IndexKeyDefinition} to be used
 */
public TroveByteIndexedCollection(final IndexKeyDefinition keyDefinition) {
	super(keyDefinition);

	if (!keyDefinition.isSingleTypedKey(Byte.class)) {
		throw new IllegalArgumentException("The key must be a single Byte");
	}

	troveMap = new TByteObjectHashMap<Object>();
}
 
开发者ID:pmeisen,项目名称:dis-timeintervaldataanalyzer,代码行数:16,代码来源:TroveByteIndexedCollection.java

示例4: AutoDeltaBoolObjectMap

import gnu.trove.map.hash.TByteObjectHashMap; //导入依赖的package包/类
public AutoDeltaBoolObjectMap(Function<ByteBuffer, V> valueCreator) {
    this.changes = new ArrayList<>(5);
    this.container = new TByteObjectHashMap<>();
    this.baselineCommandCount = 0;
    this.valueCreator = valueCreator;
}
 
开发者ID:bacta,项目名称:pre-cu,代码行数:7,代码来源:AutoDeltaBoolObjectMap.java

示例5: AutoDeltaBoolStringMap

import gnu.trove.map.hash.TByteObjectHashMap; //导入依赖的package包/类
public AutoDeltaBoolStringMap() {
    this.changes = new ArrayList<>(5);
    this.container = new TByteObjectHashMap<>();
    this.baselineCommandCount = 0;
}
 
开发者ID:bacta,项目名称:pre-cu,代码行数:6,代码来源:AutoDeltaBoolStringMap.java

示例6: AutoDeltaByteObjectMap

import gnu.trove.map.hash.TByteObjectHashMap; //导入依赖的package包/类
public AutoDeltaByteObjectMap(Function<ByteBuffer, V> valueCreator) {
    this.changes = new ArrayList<>(5);
    this.container = new TByteObjectHashMap<>();
    this.baselineCommandCount = 0;
    this.valueCreator = valueCreator;
}
 
开发者ID:bacta,项目名称:pre-cu,代码行数:7,代码来源:AutoDeltaByteObjectMap.java

示例7: AutoDeltaByteStringMap

import gnu.trove.map.hash.TByteObjectHashMap; //导入依赖的package包/类
public AutoDeltaByteStringMap() {
    this.changes = new ArrayList<>(5);
    this.container = new TByteObjectHashMap<>();
    this.baselineCommandCount = 0;
}
 
开发者ID:bacta,项目名称:pre-cu,代码行数:6,代码来源:AutoDeltaByteStringMap.java


注:本文中的gnu.trove.map.hash.TByteObjectHashMap类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。