Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 86 for scopes (0.14 sec)

  1. guava-testlib/src/com/google/common/collect/testing/testers/ListReplaceAllTester.java

    public class ListReplaceAllTester<E> extends AbstractListTester<E> {
      @ListFeature.Require(SUPPORTS_SET)
      public void testReplaceAll() {
        getList().replaceAll(e -> samples.e3());
        expectContents(Collections.nCopies(getNumElements(), samples.e3()));
      }
    
      @ListFeature.Require(SUPPORTS_SET)
      public void testReplaceAll_changesSome() {
        getList().replaceAll(e -> e.equals(samples.e0()) ? samples.e3() : e);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Jun 28 16:27:15 GMT 2018
    - 2.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/MultisetsImmutableEntryTest.java

        return Multisets.immutableEntry(element, count);
      }
    
      private static <E extends @Nullable Object> Entry<E> control(E element, int count) {
        return HashMultiset.create(Collections.nCopies(count, element)).entrySet().iterator().next();
      }
    
      public void testToString() {
        assertEquals("foo", entry("foo", 1).toString());
        assertEquals("bar x 2", entry("bar", 2).toString());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/TopKSelectorTest.java

            };
        TopKSelector<Integer> top = TopKSelector.least(k, cmp);
        top.offer(1);
        for (int i = 1; i < n; i++) {
          top.offer(0);
        }
        assertThat(top.topK()).containsExactlyElementsIn(Collections.nCopies(k, 0));
        assertThat(compareCalls[0]).isAtMost(10L * n * IntMath.log2(k, RoundingMode.CEILING));
      }
    
      public void testExceedMaxIteration() {
        /*
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/xml/XmlEscapersTest.java

        // Test quotes are escaped.
        assertEquals("&quot;test&quot;", xmlAttributeEscaper.escape("\"test\""));
        assertEquals("&apos;test&apos;", xmlAttributeEscaper.escape("\'test'"));
        // Test all escapes
        assertEquals(
            "a&quot;b&lt;c&gt;d&amp;e&quot;f&apos;", xmlAttributeEscaper.escape("a\"b<c>d&e\"f'"));
        // Test '\t', '\n' and '\r' are escaped.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Dec 16 19:54:45 GMT 2020
    - 4.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/Files.java

          imports = "com.google.common.io.Files")
      public static void write(CharSequence from, File to, Charset charset) throws IOException {
        asCharSink(to, charset).write(from);
      }
    
      /**
       * Copies all bytes from a file to an output stream.
       *
       * <p><b>{@link java.nio.file.Path} equivalent:</b> {@link
       * java.nio.file.Files#copy(java.nio.file.Path, OutputStream)}.
       *
       * @param from the source file
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  6. android/guava/pom.xml

              <detectJavaApiLink>false</detectJavaApiLink>
              <offlineLinks>
    XML
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 11 16:37:45 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ListsTest.java

        assertThat(Lists.<Object>cartesianProduct(x, y))
            .containsExactly(exp1, exp2, exp3, exp4)
            .inOrder();
      }
    
      public void testCartesianProductTooBig() {
        List<String> list = Collections.nCopies(10000, "foo");
        try {
          Lists.cartesianProduct(list, list, list, list, list);
          fail("Expected IAE");
        } catch (IllegalArgumentException expected) {
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 35.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/HashCode.java

       * returned by this method.
       */
      // TODO(user): consider ByteString here, when that is available
      public abstract byte[] asBytes();
    
      /**
       * Copies bytes from this hash code into {@code dest}.
       *
       * @param dest the byte array into which the hash code will be written
       * @param offset the start offset in the data
       * @param maxLength the maximum number of bytes to write
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 12.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/primitives/Chars.java

            }
          }
          return left.length - right.length;
        }
    
        @Override
        public String toString() {
          return "Chars.lexicographicalComparator()";
        }
      }
    
      /**
       * Copies a collection of {@code Character} instances into a new array of primitive {@code char}
       * values.
       *
       * <p>Elements are copied from the argument collection as if by {@code collection.toArray()}.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/IterablesTest.java

        }
      }
    
      public void testConcatPeformingFiniteCycle() {
        Iterable<Integer> iterable = asList(1, 2, 3);
        int n = 4;
        Iterable<Integer> repeated = Iterables.concat(Collections.nCopies(n, iterable));
        assertThat(repeated).containsExactly(1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3).inOrder();
      }
    
      public void testPartition_badSize() {
        Iterable<Integer> source = Collections.singleton(1);
        try {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 46K bytes
    - Viewed (0)
Back to top