- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 42 for getSampleElements (0.22 sec)
-
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapValuesTester.java
public class MultimapValuesTester<K, V> extends AbstractMultimapTester<K, V, Multimap<K, V>> { public void testValues() { List<V> expected = Lists.newArrayList(); for (Entry<K, V> entry : getSampleElements()) { expected.add(entry.getValue()); } assertEqualIgnoringOrder(expected, multimap().values()); } @CollectionFeature.Require(KNOWN_ORDER) public void testValuesInOrder() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 2.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/NavigableSetNavigationTester.java
@Override public void setUp() throws Exception { super.setUp(); navigableSet = (NavigableSet<E>) getSet(); values = copyToList( getSubjectGenerator() .getSampleElements(getSubjectGenerator().getCollectionSize().getNumElements())); sort(values, navigableSet.comparator()); // some tests assume SEVERAL == 3 if (values.size() >= 1) { a = values.get(0);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 8.4K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/CollectionSpliteratorTester.java
@CollectionFeature.Require(absent = KNOWN_ORDER) public void testSpliteratorUnknownOrder() { SpliteratorTester.of(collection::spliterator).expect(getSampleElements()); } @CollectionFeature.Require(KNOWN_ORDER) public void testSpliteratorKnownOrder() { SpliteratorTester.of(collection::spliterator).expect(getOrderedElements()).inOrder(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 3.8K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/AbstractMultimapTester.java
} protected K getKeyForNullValue() { return getEntryNullReplaces().getKey(); } private Entry<K, V> getEntryNullReplaces() { Iterator<Entry<K, V>> entries = getSampleElements().iterator(); for (int i = 0; i < getNullLocation(); i++) { entries.next(); } return entries.next(); } protected void initMultimapWithNullKey() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 6K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapTester.java
public void testAsMapGet() { for (K key : sampleKeys()) { List<V> expectedValues = new ArrayList<>(); for (Entry<K, V> entry : getSampleElements()) { if (entry.getKey().equals(key)) { expectedValues.add(entry.getValue()); } } Collection<V> collection = multimap().asMap().get(key);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5.7K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/NavigableMapNavigationTester.java
@Override public void setUp() throws Exception { super.setUp(); navigableMap = (NavigableMap<K, V>) getMap(); entries = copyToList( getSubjectGenerator() .getSampleElements(getSubjectGenerator().getCollectionSize().getNumElements())); sort(entries, Helpers.<K, V>entryComparator(navigableMap.comparator())); // some tests assume SEVERAL == 3 if (entries.size() >= 1) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 9K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/MultimapEntriesTester.java
@SuppressWarnings("JUnit4ClassUsedInJUnit3") public class MultimapEntriesTester<K, V> extends AbstractMultimapTester<K, V, Multimap<K, V>> { public void testEntries() { assertEqualIgnoringOrder(getSampleElements(), multimap().entries()); } @CollectionSize.Require(absent = ZERO) @MapFeature.Require(ALLOWS_NULL_KEYS) public void testContainsEntryWithNullKeyPresent() { initMultimapWithNullKey();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/NavigableSetNavigationTester.java
@Override public void setUp() throws Exception { super.setUp(); navigableSet = (NavigableSet<E>) getSet(); values = copyToList( getSubjectGenerator() .getSampleElements(getSubjectGenerator().getCollectionSize().getNumElements())); sort(values, navigableSet.comparator()); // some tests assume SEVERAL == 3 if (values.size() >= 1) { a = values.get(0);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 8.4K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapTester.java
public void testAsMapGet() { for (K key : sampleKeys()) { List<V> expectedValues = new ArrayList<>(); for (Entry<K, V> entry : getSampleElements()) { if (entry.getKey().equals(key)) { expectedValues.add(entry.getValue()); } } Collection<V> collection = multimap().asMap().get(key);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5.7K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/DerivedGoogleCollectionGenerators.java
@SuppressWarnings("unchecked") V[] valuesArray = (V[]) elements; // Start with a suitably shaped collection of entries Collection<Entry<K, V>> originalEntries = mapGenerator.getSampleElements(elements.length); // Create a copy of that, with the desired value for each value Collection<Entry<K, V>> entries = new ArrayList<>(elements.length); int i = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 6.8K bytes - Viewed (0)