Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for CharEscaperBuilder (0.2 sec)

  1. android/guava/src/com/google/common/escape/CharEscaperBuilder.java

      // The highest index we've seen so far.
      private int max = -1;
    
      /** Construct a new sparse array builder. */
      public CharEscaperBuilder() {
        this.map = new HashMap<>();
      }
    
      /** Add a new mapping from an index to an object to the escaping. */
      @CanIgnoreReturnValue
      public CharEscaperBuilder addEscape(char c, String r) {
        map.put(c, checkNotNull(r));
        if (c > max) {
          max = c;
        }
        return this;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/escape/CharEscaperBuilderTest.java

    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)
  3. android/guava-tests/test/com/google/common/escape/CharEscaperBuilderTest.java

    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 May 03 12:43:13 GMT 2024
    - Last Modified: Tue May 15 20:25:06 GMT 2018
    - 975 bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/escape/Escaper.java

     *
     * <p>Popular escapers are defined as constants in classes like {@link
     * com.google.common.html.HtmlEscapers} and {@link com.google.common.xml.XmlEscapers}. To create
     * your own escapers, use {@link CharEscaperBuilder}, or extend {@code CharEscaper} or {@code
     * UnicodeEscaper}.
     *
     * @author David Beaumont
     * @since 15.0
     */
    @DoNotMock("Use Escapers.nullEscaper() or another methods from the *Escapers classes")
    @GwtCompatible
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 16:02:17 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/escape/CharEscaper.java

       * called by the {@link #escape(String)} method when it discovers that escaping is required. It is
       * protected to allow subclasses to override the fastpath escaping function to inline their
       * escaping test. See {@link CharEscaperBuilder} for an example usage.
       *
       * @param s the literal string to be escaped
       * @param index the index to start escaping from
       * @return the escaped form of {@code string}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 6.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/escape/UnicodeEscaper.java

       * called by the {@link #escape(String)} method when it discovers that escaping is required. It is
       * protected to allow subclasses to override the fastpath escaping function to inline their
       * escaping test. See {@link CharEscaperBuilder} for an example usage.
       *
       * <p>This method is not reentrant and may only be invoked by the top level {@link
       * #escape(String)} method.
       *
       * @param s the literal string to be escaped
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 13.2K bytes
    - Viewed (0)
Back to top