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

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

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

TIntIntMap.size介绍

[英]Returns an int value that is the number of elements in the map.
[中]返回一个int值,该值是映射中的元素数。

代码示例

代码示例来源: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

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>TIntIntHashMap</code> instance containing
 * all of the entries in the map passed in.
 *
 * @param map a <tt>TIntIntMap</tt> that will be duplicated.
 */
public TIntIntHashMap( TIntIntMap map ) {
  super( map.size() );
  if ( map instanceof TIntIntHashMap ) {
    TIntIntHashMap hashmap = ( TIntIntHashMap ) map;
    this._loadFactor = hashmap._loadFactor;
    this.no_entry_key = hashmap.no_entry_key;
    this.no_entry_value = hashmap.no_entry_value;
    //noinspection RedundantCast
    if ( this.no_entry_key != ( int ) 0 ) {
      Arrays.fill( _set, this.no_entry_key );
    }
    //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

/** {@inheritDoc} */
@Override
public boolean equals( Object other ) {
  if ( ! ( other instanceof TIntIntMap ) ) {
    return false;
  }
  TIntIntMap that = ( TIntIntMap ) other;
  if ( that.size() != this.size() ) {
    return false;
  }
  int[] values = _values;
  byte[] states = _states;
  int this_no_entry_value = getNoEntryValue();
  int that_no_entry_value = that.getNoEntryValue();
  for ( int i = values.length; i-- > 0; ) {
    if ( states[i] == FULL ) {
      int key = _set[i];
      int that_value = that.get( key );
      int this_value = values[i];
      if ( ( this_value != that_value ) &&
         ( this_value != this_no_entry_value ) &&
         ( that_value != that_no_entry_value ) ) {
        return false;
      }
    }
  }
  return true;
}

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

RaptorWorker worker = new RaptorWorker(raptorWorkerData, request);
  propagatedTimesStore = worker.runRaptor(graph, transitStopAccessTimes, nonTransitTimes, ts);
  ts.initialStopCount = transitStopAccessTimes.size();
} else {

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

/** {@inheritDoc} */
public void putAll( TIntIntMap map ) {
  ensureCapacity( map.size() );
  TIntIntIterator iter = map.iterator();
  while ( iter.hasNext() ) {
    iter.advance();
    this.put( iter.key(), iter.value() );
  }
}

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

LOG.info("Found {} transit stops", accessTimes.size());
  return accessTimes;
} else {

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

int stopIndex = indexForStop.get(vidx);
  if (stopIndex == -1) {
    stopIndex = indexForStop.size();
    indexForStop.put(vidx, stopIndex);
    stopForIndex.add(vidx);
int[] flat = new int[out.size() * 2];

代码示例来源: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: com.palantir.patches.sourceforge/trove3

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

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

/**
 * {@inheritDoc}
 */
public int size() {
  return indexToCount.size();
}

代码示例来源:origin: com.conveyal/r5

/**
 * @return true when maxStops transitStops are found
 */
public boolean shouldBreakSearch() {
  return stops.size() >= this.maxStops;
}

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

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

代码示例来源:origin: conveyal/r5

/**
 * @return true when maxStops transitStops are found
 */
public boolean shouldBreakSearch() {
  return stops.size() >= this.maxStops;
}

代码示例来源: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/trove4j

/** {@inheritDoc} */
public void putAll( TIntIntMap map ) {
  ensureCapacity( map.size() );
  TIntIntIterator iter = map.iterator();
  while ( iter.hasNext() ) {
    iter.advance();
    this.put( iter.key(), iter.value() );
  }
}

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

/** {@inheritDoc} */
public void putAll( TIntIntMap map ) {
  ensureCapacity( map.size() );
  TIntIntIterator iter = map.iterator();
  while ( iter.hasNext() ) {
    iter.advance();
    this.put( iter.key(), iter.value() );
  }
}

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

/** {@inheritDoc} */
@Override
public void putAll( TIntIntMap map ) {
  ensureCapacity( map.size() );
  TIntIntIterator iter = map.iterator();
  while ( iter.hasNext() ) {
    iter.advance();
    this.put( iter.key(), iter.value() );
  }
}

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

/** {@inheritDoc} */
@Override
public void putAll( TIntIntMap map ) {
  ensureCapacity( map.size() );
  TIntIntIterator iter = map.iterator();
  while ( iter.hasNext() ) {
    iter.advance();
    this.put( iter.key(), iter.value() );
  }
}

相关文章