Java 类gnu.trove.map.TByteObjectMap 实例源码

项目:FlexMC    文件:FlexWorld.java   
public ChunkColumn getChunkAt( int x, int z ) {
    this.chunkLock.readLock().lock();
    try {
        int i = x / 16;
        if ( x < 0 ) {
            i--;
        }
        int j = z / 16;
        if ( z < 0 ) {
            j--;
        }
        TByteObjectMap<ChunkColumn> map = this.columns.get( (byte) i );
        if ( map == null ) {
            return null;
        }
        return map.get( (byte) j );
    } finally {
        this.chunkLock.readLock().unlock();
    }
}
项目:FlexMC    文件:FlexWorld.java   
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();
    }
}
项目:FlexMC    文件:FlexWorld.java   
public List<ChunkColumn> getColumns() {
    List<ChunkColumn> list = new ArrayList<>();
    this.chunkLock.readLock().lock();
    try {
        this.columns.forEachValue( new TObjectProcedure<TByteObjectMap<ChunkColumn>>() {
            @Override
            public boolean execute( TByteObjectMap<ChunkColumn> value ) {
                list.addAll( value.valueCollection() );
                return true;
            }
        } );
    } finally {
        this.chunkLock.readLock().unlock();
    }
    return list;
}
项目:xcc    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TByteObjectMap ) ) {
        return false;
    }
    TByteObjectMap that = ( TByteObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TByteObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            byte key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:xcc    文件:TByteObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TByteObjectMap<V> ) in.readObject();
}
项目:HCFCore    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TByteObjectMap ) ) {
        return false;
    }
    TByteObjectMap that = ( TByteObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TByteObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            byte key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:HCFCore    文件:TByteObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TByteObjectMap<V> ) in.readObject();
}
项目:HCFCore    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TByteObjectMap ) ) {
        return false;
    }
    TByteObjectMap that = ( TByteObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TByteObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            byte key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:HCFCore    文件:TByteObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TByteObjectMap<V> ) in.readObject();
}
项目:trove-3.0.3    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
@Override
@SuppressWarnings("rawtypes")
public boolean equals( Object other ) {
    if ( ! ( other instanceof TByteObjectMap ) ) {
        return false;
    }
    TByteObjectMap that = ( TByteObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TByteObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            byte key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:trove-3.0.3    文件:TByteObjectMapDecorator.java   
@Override
@SuppressWarnings("unchecked")
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TByteObjectMap<V> ) in.readObject();
}
项目:easyrec_major    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TByteObjectMap ) ) {
        return false;
    }
    TByteObjectMap that = ( TByteObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TByteObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            byte key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:easyrec_major    文件:TByteObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TByteObjectMap<V> ) in.readObject();
}
项目:recalot.com    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TByteObjectMap ) ) {
        return false;
    }
    TByteObjectMap that = ( TByteObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TByteObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            byte key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:recalot.com    文件:TByteObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TByteObjectMap<V> ) in.readObject();
}
项目:easyrec-PoC    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TByteObjectMap ) ) {
        return false;
    }
    TByteObjectMap that = ( TByteObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TByteObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            byte key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:easyrec-PoC    文件:TByteObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TByteObjectMap<V> ) in.readObject();
}
项目:easyrec    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TByteObjectMap ) ) {
        return false;
    }
    TByteObjectMap that = ( TByteObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TByteObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            byte key = iter.key();
            Object value = iter.value();
            if ( value == null ) {
                if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                    return false;
                }
            } else {
                if ( !value.equals( that.get( key ) ) ) {
                    return false;
                }
            }
        }
    } catch ( ClassCastException ex ) {
        // unused.
    }
    return true;
}
项目:easyrec    文件:TByteObjectMapDecorator.java   
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TByteObjectMap<V> ) in.readObject();
}
项目:xcc    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TByteObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:HCFCore    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TByteObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:HCFCore    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TByteObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:trove-3.0.3    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
@Override
public void putAll( TByteObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:easyrec_major    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TByteObjectMap<V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:recalot.com    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TByteObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:easyrec-PoC    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TByteObjectMap<V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:pre-cu    文件:AutoDeltaBoolObjectMap.java   
public TByteObjectMap<V> getMap() {
    return container;
}
项目:pre-cu    文件:AutoDeltaBoolStringMap.java   
public TByteObjectMap<String> getMap() {
    return container;
}
项目:pre-cu    文件:AutoDeltaByteObjectMap.java   
public TByteObjectMap<V> getMap() {
    return container;
}
项目:pre-cu    文件:AutoDeltaByteStringMap.java   
public TByteObjectMap<String> getMap() {
    return container;
}
项目:easyrec    文件:TByteObjectHashMap.java   
/** {@inheritDoc} */
public void putAll( TByteObjectMap<V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
项目:xcc    文件:TByteObjectHashMap.java   
/**
 * Creates a new <code>TByteObjectHashMap</code> that contains the entries
 * in the map passed to it.
 *
 * @param map the <tt>TByteObjectMap</tt> to be copied.
 */
public TByteObjectHashMap( TByteObjectMap<? extends V> map ) {
    this( map.size(), 0.5f, map.getNoEntryKey() );
    putAll( map );
}
项目:xcc    文件:TByteObjectMapDecorator.java   
/**
 * Creates a wrapper that decorates the specified primitive map.
 *
 * @param map the <tt>TByteObjectMap</tt> to wrap.
 */
public TByteObjectMapDecorator( TByteObjectMap<V> map ) {
    super();
    this._map = map;
}
项目:xcc    文件:TByteObjectMapDecorator.java   
/**
 * Returns a reference to the map wrapped by this decorator.
 *
 * @return the wrapped <tt>TByteObjectMap</tt> instance.
 */
public TByteObjectMap<V> getMap() {
    return _map;
}
项目:HCFCore    文件:TByteObjectHashMap.java   
/**
 * Creates a new <code>TByteObjectHashMap</code> that contains the entries
 * in the map passed to it.
 *
 * @param map the <tt>TByteObjectMap</tt> to be copied.
 */
public TByteObjectHashMap( TByteObjectMap<? extends V> map ) {
    this( map.size(), 0.5f, map.getNoEntryKey() );
    putAll( map );
}
项目:HCFCore    文件:TByteObjectMapDecorator.java   
/**
 * Creates a wrapper that decorates the specified primitive map.
 *
 * @param map the <tt>TByteObjectMap</tt> to wrap.
 */
public TByteObjectMapDecorator( TByteObjectMap<V> map ) {
    super();
    this._map = map;
}
项目:HCFCore    文件:TByteObjectMapDecorator.java   
/**
 * Returns a reference to the map wrapped by this decorator.
 *
 * @return the wrapped <tt>TByteObjectMap</tt> instance.
 */
public TByteObjectMap<V> getMap() {
    return _map;
}
项目:HCFCore    文件:TByteObjectHashMap.java   
/**
 * Creates a new <code>TByteObjectHashMap</code> that contains the entries
 * in the map passed to it.
 *
 * @param map the <tt>TByteObjectMap</tt> to be copied.
 */
public TByteObjectHashMap( TByteObjectMap<? extends V> map ) {
    this( map.size(), 0.5f, map.getNoEntryKey() );
    putAll( map );
}
项目:HCFCore    文件:TByteObjectMapDecorator.java   
/**
 * Creates a wrapper that decorates the specified primitive map.
 *
 * @param map the <tt>TByteObjectMap</tt> to wrap.
 */
public TByteObjectMapDecorator( TByteObjectMap<V> map ) {
    super();
    this._map = map;
}
项目:HCFCore    文件:TByteObjectMapDecorator.java   
/**
 * Returns a reference to the map wrapped by this decorator.
 *
 * @return the wrapped <tt>TByteObjectMap</tt> instance.
 */
public TByteObjectMap<V> getMap() {
    return _map;
}