Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 2,820 for fill (0.13 sec)

  1. guava-tests/test/com/google/common/cache/CacheExpirationTest.java

          WatchedCreatorLoader loader,
          FakeTicker ticker,
          String keyPrefix,
          long ttl) {
    
        int shift1 = 10 + VALUE_PREFIX;
        loader.setValuePrefix(shift1);
        // fill with initial data
        for (int i = 0; i < 10; i++) {
          assertEquals(Integer.valueOf(i + shift1), cache.getUnchecked(keyPrefix + i));
        }
        assertEquals(10, CacheTesting.expirationQueueSize(cache));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/Ascii.java

       * Truncates the given character sequence to the given maximum length. If the length of the
       * sequence is greater than {@code maxLength}, the returned string will be exactly {@code
       * maxLength} chars in length and will end with the given {@code truncationIndicator}. Otherwise,
       * the sequence will be returned as a string with no changes to the content.
       *
       * <p>Examples:
       *
       * <pre>{@code
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jul 19 15:43:07 GMT 2021
    - 21.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/ByteStreamsTest.java

        Arrays.fill(b, (byte) 0);
        ByteStreams.readFully(newTestStream(10), b, 0, 0);
        assertThat(b).isEqualTo(new byte[10]);
    
        Arrays.fill(b, (byte) 0);
        ByteStreams.readFully(newTestStream(10), b, 0, 10);
        assertThat(b).isEqualTo(newPreFilledByteArray(10));
    
        Arrays.fill(b, (byte) 0);
        ByteStreams.readFully(newTestStream(10), b, 0, 5);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (1)
  4. android/guava/src/com/google/common/collect/ObjectCountLinkedHashMap.java

      }
    
      @Override
      void init(int expectedSize, float loadFactor) {
        super.init(expectedSize, loadFactor);
        firstEntry = ENDPOINT;
        lastEntry = ENDPOINT;
        links = new long[expectedSize];
        Arrays.fill(links, UNSET);
      }
    
      @Override
      int firstIndex() {
        return (firstEntry == ENDPOINT) ? -1 : firstEntry;
      }
    
      @Override
      int nextIndex(int index) {
        int result = getSuccessor(index);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 01 22:07:10 GMT 2021
    - 5.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/CacheEvictionTest.java

        assertThat(removalListener.getCount()).isEqualTo(1);
    
        // 2 will be cached
        assertThat(cache.getUnchecked(2)).isEqualTo(2);
        assertThat(cache.asMap().keySet()).containsExactly(2);
    
        CacheTesting.processPendingNotifications(cache);
        CacheTesting.checkValidState(cache);
        assertThat(removalListener.getCount()).isEqualTo(1);
    
        // 4 will be cached
        assertThat(cache.getUnchecked(4)).isEqualTo(4);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 14.9K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

        assertEquals(HashCode.fromString(expected), hashFunc.hashBytes(data));
      }
    
      private static byte[] fillByteArray(int size, int toFillWith) {
        byte[] array = new byte[size];
        Arrays.fill(array, (byte) toFillWith);
        return array;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Comparators.java

     *
     * <p>In light of the significant enhancements to {@code Comparator} in Java 8, the overwhelming
     * majority of usages of {@code Ordering} can be written using only built-in JDK APIs. This class is
     * intended to "fill the gap" and provide those features of {@code Ordering} not already provided by
     * the JDK.
     *
     * @since 21.0
     * @author Louis Wasserman
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/base/JoinerBenchmark.java

      int componentLength;
    
      private Iterable<String> components;
    
      @BeforeExperiment
      void setUp() {
        String component = Strings.repeat("a", componentLength);
        String[] raw = new String[count];
        Arrays.fill(raw, component);
        components = Arrays.asList(raw);
      }
    
      /** {@link Joiner} with a string delimiter. */
      @Benchmark
      int joinerWithStringDelimiter(int reps) {
        int dummy = 0;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/Crc32cHashFunctionTest.java

      }
    
      public void testFull() {
        // Test 32 byte array of 0xFF.
        byte[] fulls = new byte[32];
        Arrays.fill(fulls, (byte) 0xFF);
        assertCrc(0x62a8ab43, fulls);
      }
    
      public void testFull100() {
        // Test 100 byte array of 0xFF.
        byte[] fulls = new byte[100];
        Arrays.fill(fulls, (byte) 0xFF);
        assertCrc(0xbc753add, fulls);
      }
    
      public void testAscending() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Dec 23 18:30:33 GMT 2020
    - 6.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/hash/HashCodeTest.java

        assertEquals(0x9999999999999999L, HashCode.fromBytesNoCopy(byteArrayWith9s(8)).padToLong());
      }
    
      private static byte[] byteArrayWith9s(int size) {
        byte[] bytez = new byte[size];
        Arrays.fill(bytez, (byte) 0x99);
        return bytez;
      }
    
      public void testToString() {
        byte[] data = new byte[] {127, -128, 5, -1, 14};
        assertEquals("7f8005ff0e", HashCode.fromBytes(data).toString());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.1K bytes
    - Viewed (0)
Back to top