Java Code Examples for gnu.trove.map.TIntObjectMap#size()
The following examples show how to use
gnu.trove.map.TIntObjectMap#size() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TroveIntObjectMapTest.java From hashmapTest with The Unlicense | 5 votes |
@Override public int test() { final TIntObjectMap<Integer> m_map = new TIntObjectHashMap<>( m_keys.length, m_fillFactor ); for ( int i = 0; i < m_keys.length; ++i ) m_map.put( m_keys[ i ], null ); for ( int i = 0; i < m_keys.length; ++i ) m_map.put( m_keys[ i ], null ); return m_map.size(); }
Example 2
Source File: TroveIntObjectMapTest.java From hashmapTest with The Unlicense | 5 votes |
@Override public int test() { final TIntObjectMap<Integer> m_map = new TIntObjectHashMap<>( m_keys.length / 2 + 1, m_fillFactor ); final Integer value = 1; int add = 0, remove = 0; while ( add < m_keys.length ) { m_map.put( m_keys[ add ], value ); ++add; m_map.put( m_keys[ add ], value ); ++add; m_map.remove( m_keys[ remove++ ] ); } return m_map.size(); }
Example 3
Source File: ChrPosMap.java From systemsgenetics with GNU General Public License v3.0 | 5 votes |
public int size(){ int count = 0; for(TIntObjectMap<E> chrResults : data.values()){ count += chrResults.size(); } return count; }