Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for getOnlyElement (0.09 sec)

  1. android/guava-testlib/src/com/google/common/collect/testing/google/MultisetEntrySetTester.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.collect.testing.google;
    
    import static com.google.common.collect.Iterables.getOnlyElement;
    import static com.google.common.collect.testing.features.CollectionFeature.SUPPORTS_ADD;
    import static com.google.common.collect.testing.features.CollectionFeature.SUPPORTS_ITERATOR_REMOVE;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/google/MultisetEntrySetTester.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.collect.testing.google;
    
    import static com.google.common.collect.Iterables.getOnlyElement;
    import static com.google.common.collect.testing.features.CollectionFeature.SUPPORTS_ADD;
    import static com.google.common.collect.testing.features.CollectionFeature.SUPPORTS_ITERATOR_REMOVE;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapTester.java

     * the License.
     */
    
    package com.google.common.collect.testing.google;
    
    import static com.google.common.collect.Iterables.getOnlyElement;
    import static com.google.common.collect.testing.Helpers.assertContentsAnyOrder;
    import static com.google.common.collect.testing.Helpers.assertContentsInOrder;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/ImmutableEnumMap.java

     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.base.Preconditions.checkArgument;
    import static com.google.common.collect.Iterables.getOnlyElement;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.collect.ImmutableMap.IteratorBasedImmutableMap;
    import java.io.InvalidObjectException;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapTester.java

     * the License.
     */
    
    package com.google.common.collect.testing.google;
    
    import static com.google.common.collect.Iterables.getOnlyElement;
    import static com.google.common.collect.testing.Helpers.assertContentsAnyOrder;
    import static com.google.common.collect.testing.Helpers.assertContentsInOrder;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/ImmutableEnumMap.java

     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.base.Preconditions.checkArgument;
    import static com.google.common.collect.Iterables.getOnlyElement;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.collect.ImmutableMap.IteratorBasedImmutableMap;
    import java.io.InvalidObjectException;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/MapGenerators.java

     * limitations under the License.
     */
    
    package com.google.common.collect.testing.google;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.collect.Iterables.getOnlyElement;
    import static com.google.common.collect.testing.Helpers.mapEntry;
    import static java.util.Arrays.asList;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.collect.ImmutableMap;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

        Iterator<String> iterator = singletonList("foo").iterator();
        assertEquals("foo", getOnlyElement(iterator));
      }
    
      public void testGetOnlyElement_noDefault_empty() {
        Iterator<String> iterator = emptyIterator();
        assertThrows(NoSuchElementException.class, () -> getOnlyElement(iterator));
      }
    
      public void testGetOnlyElement_noDefault_moreThanOneLessThanFiveElements() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/IteratorsTest.java

        Iterator<String> iterator = singletonList("foo").iterator();
        assertEquals("foo", getOnlyElement(iterator));
      }
    
      public void testGetOnlyElement_noDefault_empty() {
        Iterator<String> iterator = emptyIterator();
        assertThrows(NoSuchElementException.class, () -> getOnlyElement(iterator));
      }
    
      public void testGetOnlyElement_noDefault_moreThanOneLessThanFiveElements() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/IterablesTest.java

      }
    
      public void testGetOnlyElement_withDefault_singleton() {
        Iterable<String> iterable = singletonList("foo");
        assertEquals("foo", getOnlyElement(iterable, "bar"));
      }
    
      public void testGetOnlyElement_withDefault_empty() {
        Iterable<String> iterable = emptyList();
        assertEquals("bar", getOnlyElement(iterable, "bar"));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 19:12:33 UTC 2024
    - 45K bytes
    - Viewed (0)
Back to top