@Test public void testDescendingIteration() { SafeIterableMap<Integer, Boolean> map = mapOf(1, 2, 3, 4); int[] expected = new int[]{4, 3, 2, 1}; int index = 0; for (Iterator<Entry<Integer, Boolean>> iter = map.descendingIterator(); iter.hasNext(); ) { assertThat(iter.next().getKey(), is(expected[index++])); } assertThat(index, is(4)); }
public Iterator<Map.Entry<K, V>> descendingIterator() { DescendingIterator<K, V> iterator = new DescendingIterator<>(mEnd, mStart); mIterators.put(iterator, false); return iterator; }
SafeIterableMap implements Iterable<Map.Entry<K, V>> { public Iterator<Map.Entry<K, V>> descendingIterator() { DescendingIterator<K, V> iterator = new DescendingIterator<>(mEnd, mStart); mIterators.put(iterator, false); return iterator; } }
SafeIterableMap implements Iterable<Map.Entry<K, V>> { public Iterator<Map.Entry<K, V>> descendingIterator() { DescendingIterator<K, V> iterator = new DescendingIterator<>(mEnd, mStart); mIterators.put(iterator, false); return iterator; }  }
SafeIterableMap implements Iterable<Map.Entry<K, V>> { public Iterator<Map.Entry<K, V>> descendingIterator() { DescendingIterator<K, V> iterator = new DescendingIterator<>(mEnd, mStart); mIterators.put(iterator, false); return iterator; }  V putIfAbsent(@NonNull K key, @NonNull V v); V remove(@NonNull K key); int size(); @NonNull @Override Iterator<Map.Entry<K, V>> iterator(); Iterator<Map.Entry<K, V>> descendingIterator(); IteratorWithAdditions iteratorWithAdditions(); Map.Entry<K, V> eldest(); Map.Entry<K, V> newest(); @Override boolean equals(Object obj); @Override String toString(); }
SafeIterableMap implements Iterable<Map.Entry<K, V>> { public Iterator<Map.Entry<K, V>> descendingIterator() { DescendingIterator<K, V> iterator = new DescendingIterator<>(mEnd, mStart); mIterators.put(iterator, false); return iterator; }  V putIfAbsent(@NonNull K key, @NonNull V v); V remove(@NonNull K key); int size(); @NonNull @Override Iterator<Map.Entry<K, V>> iterator(); Iterator<Map.Entry<K, V>> descendingIterator(); IteratorWithAdditions iteratorWithAdditions(); Map.Entry<K, V> eldest(); Map.Entry<K, V> newest(); @Override boolean equals(Object obj); @Override String toString();  }