- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for CharEscaperBuilder (0.19 sec)
-
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;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 4K bytes - Viewed (0) -
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")); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 975 bytes - Viewed (0) -
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")); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 15 20:25:06 UTC 2018 - 975 bytes - Viewed (0) -
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}
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 6.7K bytes - Viewed (0) -
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}
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 6.7K bytes - Viewed (0) -
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
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 13.2K bytes - Viewed (0)