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


Java TShortObjectMap类代码示例

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


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

示例1: equals

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
/** {@inheritDoc} */
public boolean equals( Object other ) {
    if ( ! ( other instanceof TShortObjectMap ) ) {
        return false;
    }
    TShortObjectMap that = ( TShortObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TShortObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            short 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;
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:31,代码来源:TShortObjectHashMap.java

示例2: readExternal

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TShortObjectMap<V> ) in.readObject();
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:11,代码来源:TShortObjectMapDecorator.java

示例3: equals

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
@SuppressWarnings("rawtypes")
public boolean equals( Object other ) {
    if ( ! ( other instanceof TShortObjectMap ) ) {
        return false;
    }
    TShortObjectMap that = ( TShortObjectMap ) other;
    if ( that.size() != this.size() ) {
        return false;
    }
    try {
        TShortObjectIterator iter = this.iterator();
        while ( iter.hasNext() ) {
            iter.advance();
            short 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;
}
 
开发者ID:palantir,项目名称:trove-3.0.3,代码行数:33,代码来源:TShortObjectHashMap.java

示例4: readExternal

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void readExternal( ObjectInput in )
    throws IOException, ClassNotFoundException {

    // VERSION
    in.readByte();

    // MAP
    //noinspection unchecked
    _map = ( TShortObjectMap<V> ) in.readObject();
}
 
开发者ID:palantir,项目名称:trove-3.0.3,代码行数:13,代码来源:TShortObjectMapDecorator.java

示例5: putAll

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
/** {@inheritDoc} */
public void putAll( TShortObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:5,代码来源:TShortObjectHashMap.java

示例6: putAll

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void putAll( TShortObjectMap<? extends V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
 
开发者ID:palantir,项目名称:trove-3.0.3,代码行数:6,代码来源:TShortObjectHashMap.java

示例7: putAll

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
/** {@inheritDoc} */
public void putAll( TShortObjectMap<V> map ){
    map.forEachEntry( PUT_ALL_PROC );
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:5,代码来源:TShortObjectHashMap.java

示例8: getMap

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
public TShortObjectMap<V> getMap() {
    return container;
}
 
开发者ID:bacta,项目名称:pre-cu,代码行数:4,代码来源:AutoDeltaShortObjectMap.java

示例9: getMap

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
public TShortObjectMap<String> getMap() {
    return container;
}
 
开发者ID:bacta,项目名称:pre-cu,代码行数:4,代码来源:AutoDeltaShortStringMap.java

示例10: TShortObjectHashMap

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
/**
 * Creates a new <code>TShortObjectHashMap</code> that contains the entries
 * in the map passed to it.
 *
 * @param map the <tt>TShortObjectMap</tt> to be copied.
 */
public TShortObjectHashMap( TShortObjectMap<? extends V> map ) {
    this( map.size(), 0.5f, map.getNoEntryKey() );
    putAll( map );
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:11,代码来源:TShortObjectHashMap.java

示例11: TShortObjectMapDecorator

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
/**
 * Creates a wrapper that decorates the specified primitive map.
 *
 * @param map the <tt>TShortObjectMap</tt> to wrap.
 */
public TShortObjectMapDecorator( TShortObjectMap<V> map ) {
    super();
    this._map = map;
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:10,代码来源:TShortObjectMapDecorator.java

示例12: getMap

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
/**
 * Returns a reference to the map wrapped by this decorator.
 *
 * @return the wrapped <tt>TShortObjectMap</tt> instance.
 */
public TShortObjectMap<V> getMap() {
    return _map;
}
 
开发者ID:JianpingZeng,项目名称:xcc,代码行数:9,代码来源:TShortObjectMapDecorator.java

示例13: TShortObjectHashMap

import gnu.trove.map.TShortObjectMap; //导入依赖的package包/类
/**
 * Creates a new <code>TShortObjectHashMap</code> that contains the entries
 * in the map passed to it.
 *
 * @param map the <tt>TShortObjectMap</tt> to be copied.
 */
public TShortObjectHashMap( TShortObjectMap<V> map ) {
    this( map.size(), 0.5f, map.getNoEntryKey() );
    putAll( map );
}
 
开发者ID:major2015,项目名称:easyrec_major,代码行数:11,代码来源:TShortObjectHashMap.java


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