Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for Reset (0.16 sec)

  1. android/guava-tests/test/com/google/common/base/StopwatchTest.java

        assertEquals("9.999 \u03bcs", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance(1234567);
        assertEquals("1.235 ms", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance(5000000000L);
        assertEquals("5.000 s", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance((long) (1.5 * 60 * 1000000000L));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        assertTrue(reader.markSupported());
    
        assertEquals(string, readFully(reader));
        assertFullyRead(reader);
    
        // reset and read again
        reader.reset();
        assertEquals(string, readFully(reader));
        assertFullyRead(reader);
    
        // reset, skip, mark, then read the rest
        reader.reset();
        assertEquals(5, reader.skip(5));
        reader.mark(Integer.MAX_VALUE);
        assertEquals(string.substring(5), readFully(reader));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

          }
        }
        out.close();
    
        // Check that source returns the right data
        assertTrue(Arrays.equals(data, source.read()));
    
        // Make sure that reset deleted the file
        out.reset();
        if (file != null) {
          assertFalse(file.exists());
        }
      }
    
    
      public void testThreshold_resetOnFinalize() throws Exception {
        testThreshold(0, 100, true, true);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/Java8Compatibility.java

        b.limit(limit);
      }
    
      static void mark(Buffer b) {
        b.mark();
      }
    
      static void position(Buffer b, int position) {
        b.position(position);
      }
    
      static void reset(Buffer b) {
        b.reset();
      }
    
      private Java8Compatibility() {}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        for (int i = 0; i < 10; i++) {
          assertEquals(Integer.valueOf(VALUE_PREFIX + i), cache.getUnchecked(KEY_PREFIX + i));
        }
    
        for (int i = 0; i < 10; i++) {
          loader.reset();
          assertEquals(Integer.valueOf(VALUE_PREFIX + i), cache.getUnchecked(KEY_PREFIX + i));
          assertFalse("Creator should not have been called @#" + i, loader.wasCalled());
        }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/FileBackedOutputStream.java

       *
       * @throws IOException if an I/O error occurred while deleting the file buffer
       */
      public synchronized void reset() throws IOException {
        try {
          close();
        } finally {
          if (memory == null) {
            memory = new MemoryOutput();
          } else {
            memory.reset();
          }
          out = memory;
          if (file != null) {
            File deleteMe = file;
            file = null;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/base/StopwatchTest.java

        assertEquals("9.999 \u03bcs", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance(1234567);
        assertEquals("1.235 ms", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance(5000000000L);
        assertEquals("5.000 s", stopwatch.toString());
        stopwatch.reset();
        stopwatch.start();
        ticker.advance((long) (1.5 * 60 * 1000000000L));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        assertTrue(reader.markSupported());
    
        assertEquals(string, readFully(reader));
        assertFullyRead(reader);
    
        // reset and read again
        reader.reset();
        assertEquals(string, readFully(reader));
        assertFullyRead(reader);
    
        // reset, skip, mark, then read the rest
        reader.reset();
        assertEquals(5, reader.skip(5));
        reader.mark(Integer.MAX_VALUE);
        assertEquals(string.substring(5), readFully(reader));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  9. guava/src/com/google/common/cache/LongAdder.java

       * method is intrinsically racy, it should only be used when it is known that no threads are
       * concurrently updating.
       */
      public void reset() {
        internalReset(0L);
      }
    
      /**
       * Equivalent in effect to {@link #sum} followed by {@link #reset}. This method may apply for
       * example during quiescent points between multithreaded computations. If there are updates
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 5.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

        assertEquals(0, lin.available());
        read = lin.read();
        assertEquals(-1, read);
    
        lin.reset();
        byte[] small = new byte[5];
        read = lin.read(small);
        assertEquals(2, read);
        assertEquals(big[0], small[0]);
        assertEquals(big[1], small[1]);
    
        lin.reset();
        read = lin.read(small, 2, 3);
        assertEquals(2, read);
        assertEquals(big[0], small[2]);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
Back to top