Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 97 for Scharf (0.14 sec)

  1. guava-tests/test/com/google/common/escape/CharEscaperBuilderTest.java

     * limitations under the License.
     */
    
    package com.google.common.escape;
    
    import junit.framework.TestCase;
    
    public class CharEscaperBuilderTest extends TestCase {
    
      public void testAddEscapes() {
        char[] cs = {'a', 'b', 'c'};
        CharEscaperBuilder builder = new CharEscaperBuilder().addEscapes(cs, "Z");
        Escaper escaper = builder.toEscaper();
        assertEquals("ZZZdef", escaper.escape("abcdef"));
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 975 bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/TestCharSource.java

     */
    
    package com.google.common.io;
    
    import static com.google.common.base.Charsets.UTF_8;
    
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.Reader;
    
    /**
     * A char source for testing that has configurable options.
     *
     * @author Colin Decker
     */
    public class TestCharSource extends CharSource implements TestStreamSupplier {
    
      private final TestByteSource byteSource;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 21 02:27:51 GMT 2017
    - 1.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/MultiReader.java

      private void advance() throws IOException {
        close();
        if (it.hasNext()) {
          current = it.next().openStream();
        }
      }
    
      @Override
      public int read(char[] cbuf, int off, int len) throws IOException {
        checkNotNull(cbuf);
        if (current == null) {
          return -1;
        }
        int result = current.read(cbuf, off, len);
        if (result == -1) {
          advance();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2.4K bytes
    - Viewed (2)
  4. guava-tests/test/com/google/common/io/AppendableWriterTest.java

        StringBuilder result = new StringBuilder();
    
        @Override
        public Appendable append(CharSequence csq) {
          result.append(csq);
          return this;
        }
    
        @Override
        public Appendable append(char c) {
          result.append(c);
          return this;
        }
    
        @Override
        public Appendable append(CharSequence csq, int start, int end) {
          result.append(csq, start, end);
          return this;
        }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

        hasher.putLong(0x0807060504030201L);
        hasher.assertBytes(new byte[] {1, 2, 3, 4, 5, 6, 7, 8});
      }
    
      public void testChar() {
        TestHasher hasher = new TestHasher();
        hasher.putChar((char) 0x0201);
        hasher.assertBytes(new byte[] {1, 2});
      }
    
      public void testString() {
        Random random = new Random();
        for (int i = 0; i < 100; i++) {
          byte[] bytes = new byte[64];
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/CharSequenceReader.java

        checkOpen();
        requireNonNull(seq); // safe because of checkOpen
        return hasRemaining() ? seq.charAt(pos++) : -1;
      }
    
      @Override
      public synchronized int read(char[] cbuf, int off, int len) throws IOException {
        checkPositionIndexes(off, off + len, cbuf.length);
        checkOpen();
        requireNonNull(seq); // safe because of checkOpen
        if (!hasRemaining()) {
          return -1;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/hash/HashStringBenchmark.java

            int codePoint;
            // discard illegal surrogate "codepoints"
            do {
              codePoint = rnd.nextInt(maxCodePoint.value);
            } while (Character.isSurrogate((char) codePoint));
            sb.appendCodePoint(codePoint);
          }
          strings[i] = sb.toString();
        }
      }
    
      @Benchmark
      int hashUtf8(int reps) {
        int res = 0;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 5.3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/SourceSinkTester.java

      static final ImmutableMap<String, String> TEST_STRINGS =
          ImmutableMap.<String, String>builder()
              .put("empty", "")
              .put("1 char", "0")
              .put("1 word", "hello")
              .put("2 words", "hello world")
              .put("\\n line break", "hello\nworld")
              .put("\\r line break", "hello\rworld")
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 27 18:57:08 GMT 2022
    - 4.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/AbstractStreamingHasher.java

      @CanIgnoreReturnValue
      public final Hasher putShort(short s) {
        buffer.putShort(s);
        munchIfFull();
        return this;
      }
    
      @Override
      @CanIgnoreReturnValue
      public final Hasher putChar(char c) {
        buffer.putChar(c);
        munchIfFull();
        return this;
      }
    
      @Override
      @CanIgnoreReturnValue
      public final Hasher putInt(int i) {
        buffer.putInt(i);
        munchIfFull();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 7.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

        HashCode unused = sink.hash();
        sink.assertInvariants(8);
        sink.assertBytes(new byte[] {1, 2, 3, 4, 5, 6, 7, 8});
      }
    
      public void testChar() {
        Sink sink = new Sink(4);
        sink.putChar((char) 0x0201);
        HashCode unused = sink.hash();
        sink.assertInvariants(2);
        sink.assertBytes(new byte[] {1, 2, 0, 0}); // padded with zeros
      }
    
      public void testString() {
        Random random = new Random();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.5K bytes
    - Viewed (0)
Back to top