gnu.trove.map.TObjectIntMap.size()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中gnu.trove.map.TObjectIntMap.size()方法的一些代码示例,展示了TObjectIntMap.size()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TObjectIntMap.size()方法的具体详情如下:
包路径:gnu.trove.map.TObjectIntMap
类名称:TObjectIntMap
方法名:size

TObjectIntMap.size介绍

[英]Returns the number of key-value mappings in this map. If the map contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
[中]返回此映射中的键值映射数。如果映射包含多个整数。最大值元素,返回整数。最大值。

代码示例

代码示例来源:origin: alibaba/mdrill

/**
 * Returns the number of entries in the map.
 *
 * @return the map's size.
 */
public int size() {
  return this._map.size();
}

代码示例来源:origin: alibaba/mdrill

/**
 * Indicates whether map has any entries.
 *
 * @return true if the map is empty
 */
public boolean isEmpty() {
  return this._map.size() == 0;
}

代码示例来源:origin: alibaba/mdrill

public int size() {
  synchronized( mutex ) { return m.size(); }
}
public boolean isEmpty(){

代码示例来源:origin: alibaba/mdrill

public int size()                       { return m.size(); }
public boolean isEmpty()                { return m.isEmpty(); }

代码示例来源:origin: alibaba/mdrill

/**
 * Creates a new <code>TObjectIntHashMap</code> that contains the entries
 * in the map passed to it.
 *
 * @param map the <tt>TObjectIntMap</tt> to be copied.
 */
public TObjectIntHashMap( TObjectIntMap<? extends K> map ) {
  this( map.size(), 0.5f, map.getNoEntryValue() );
  if ( map instanceof TObjectIntHashMap ) {
    TObjectIntHashMap hashmap = ( TObjectIntHashMap ) map;
    this._loadFactor = hashmap._loadFactor;
    this.no_entry_value = hashmap.no_entry_value;
    //noinspection RedundantCast
    if ( this.no_entry_value != ( int ) 0 ) {
      Arrays.fill( _values, this.no_entry_value );
    }
    setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) );
  }
  putAll( map );
}

代码示例来源:origin: alibaba/mdrill

/**
 * Creates a new <code>TObjectIntCustomHashMap</code> that contains the entries
 * in the map passed to it.
 *
 * @param map the <tt>TObjectIntMap</tt> to be copied.
 */
public TObjectIntCustomHashMap( HashingStrategy<? super K> strategy,
  TObjectIntMap<? extends K> map ) {

  this( strategy, map.size(), 0.5f, map.getNoEntryValue() );
  if ( map instanceof TObjectIntCustomHashMap ) {
    TObjectIntCustomHashMap hashmap = ( TObjectIntCustomHashMap ) map;
    this._loadFactor = hashmap._loadFactor;
    this.no_entry_value = hashmap.no_entry_value;
    this.strategy = hashmap.strategy;
    //noinspection RedundantCast
    if ( this.no_entry_value != ( int ) 0 ) {
      Arrays.fill( _values, this.no_entry_value );
    }
    setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) );
  }
  putAll( map );
}

代码示例来源:origin: opentripplanner/OpenTripPlanner

double dY = Math.toDegrees(gridSizeMeters / SphericalDistanceLibrary.RADIUS_OF_EARTH_IN_M);
double dX = dY / cosLat;
sampleGrid = new SparseMatrixZSampleGrid<WTWD>(16, this.times.size(), dX, dY, coordinateOrigin);
AccumulativeGridSampler.AccumulativeMetric<WTWD> metric = new SampleGridRenderer.WTWDAccumulativeMetric(cosLat, D0, V0, gridSizeMeters);
AccumulativeGridSampler<WTWD> sampler = new AccumulativeGridSampler<WTWD>(sampleGrid, metric);

代码示例来源:origin: alibaba/mdrill

if ( that.size() != this.size() ) {
  return false;

代码示例来源:origin: alibaba/mdrill

if ( that.size() != this.size() ) {
  return false;

代码示例来源:origin: net.sf.trove4j/trove4j

/**
 * Returns the number of entries in the map.
 *
 * @return the map's size.
 */
public int size() {
  return this._map.size();
}

代码示例来源:origin: net.sf.trove4j/trove4j

/**
 * Indicates whether map has any entries.
 *
 * @return true if the map is empty
 */
public boolean isEmpty() {
  return this._map.size() == 0;
}

代码示例来源:origin: fozziethebeat/S-Space

/**
 * Returns the number of instances that are currently being counted.
 */
public int size() {
  return counts.size();
}

代码示例来源:origin: com.palantir.patches.sourceforge/trove3

@Override
public int size() {
  synchronized( mutex ) { return m.size(); }
}
@Override

代码示例来源:origin: com.palantir.patches.sourceforge/trove3

/**
 * Indicates whether map has any entries.
 *
 * @return true if the map is empty
 */
@Override
public boolean isEmpty() {
  return this._map.size() == 0;
}

代码示例来源:origin: net.sf.trove4j/trove4j

public int size() {
  synchronized( mutex ) { return m.size(); }
}
public boolean isEmpty(){

代码示例来源:origin: com.palantir.patches.sourceforge/trove3

/**
 * Returns the number of entries in the map.
 *
 * @return the map's size.
 */
@Override
public int size() {
  return this._map.size();
}

代码示例来源:origin: net.sf.trove4j/core

/**
 * Returns the number of entries in the map.
 *
 * @return the map's size.
 */
public int size() {
  return this._map.size();
}

代码示例来源:origin: net.sf.trove4j/core

/**
 * Indicates whether map has any entries.
 *
 * @return true if the map is empty
 */
public boolean isEmpty() {
  return this._map.size() == 0;
}

代码示例来源:origin: edu.ucla.sspace/sspace-wordsi

/**
 * Returns the number of instances that are currently being counted.
 */
public int size() {
  return counts.size();
}

代码示例来源:origin: mikvor/hashmapTest

@Override
  public int test() {
    final TObjectIntMap<Integer> m_map = new TObjectIntHashMap<>( m_keys.length, m_fillFactor );
    for ( int i = 0; i < m_keys.length; ++i )
      m_map.put( m_keys[ i ], i );
    for ( int i = 0; i < m_keys2.length; ++i )
      m_map.put( m_keys2[ i ], i );
    return m_map.size();
  }
}

相关文章