Java Code Examples for org.eclipse.collections.impl.map.mutable.UnifiedMap#size()
The following examples show how to use
org.eclipse.collections.impl.map.mutable.UnifiedMap#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: ForEachPatternUnitTest.java From tutorials with MIT License | 6 votes |
@SuppressWarnings("unchecked") @Test public void whenInstantiateAndChangeValues_thenCorrect() { Pair<Integer, String> pair1 = Tuples.pair(1, "One"); Pair<Integer, String> pair2 = Tuples.pair(2, "Two"); Pair<Integer, String> pair3 = Tuples.pair(3, "Three"); UnifiedMap<Integer, String> map = UnifiedMap.newMapWith(pair1, pair2, pair3); for (int i = 0; i < map.size(); i++) { map.put(i + 1, "New Value"); } for (int i = 0; i < map.size(); i++) { Assert.assertEquals("New Value", map.get(i + 1)); } }
Example 2
Source File: SimpleToOneDeepFetchStrategy.java From reladomo with Apache License 2.0 | 5 votes |
private void clearLeftOverObjectCache(UnifiedMap<Operation, Object> opToParentMap) { if (opToParentMap.size() == 0) { return; } this.mapper.clearLeftOverFromObjectCache(opToParentMap.values(), null, null); }