Repository: commons-text
Updated Branches:
  refs/heads/master ee94f397b -> 9e3eafcf0


[TEXT-145] Add StringLookupFactory methods for the URL encoder and
decoder string lookups.

Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/9e3eafcf
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/9e3eafcf
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/9e3eafcf

Branch: refs/heads/master
Commit: 9e3eafcf0d8193181f562106220133e9ce674762
Parents: ee94f39
Author: Gary Gregory <ggreg...@rocketsoftware.com>
Authored: Thu Oct 4 13:29:43 2018 -0600
Committer: Gary Gregory <ggreg...@rocketsoftware.com>
Committed: Thu Oct 4 13:29:43 2018 -0600

----------------------------------------------------------------------
 src/changes/changes.xml                         |  1 +
 .../text/lookup/StringLookupFactory.java        | 32 ++++++++++++++++++++
 2 files changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/9e3eafcf/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 4ee6913..0f988c3 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -47,6 +47,7 @@ The <action> type attribute can be add,update,fix,remove.
 
   <release version="1.6" date="2018-MM-DD" description="Release 1.6">
     <action issue="TEXT-144" type="update" dev="ggregory">Add the resource 
string bundle string lookup to the default set of lookups</action>
+    <action issue="TEXT-145" type="update" dev="ggregory">Add 
StringLookupFactory methods for the URL encoder and decoder string 
lookups</action>
   </release>
 
   <release version="1.5" date="2018-09-29" description="Release 1.5">

http://git-wip-us.apache.org/repos/asf/commons-text/blob/9e3eafcf/src/main/java/org/apache/commons/text/lookup/StringLookupFactory.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/commons/text/lookup/StringLookupFactory.java 
b/src/main/java/org/apache/commons/text/lookup/StringLookupFactory.java
index 25f3cd3..dd26809 100644
--- a/src/main/java/org/apache/commons/text/lookup/StringLookupFactory.java
+++ b/src/main/java/org/apache/commons/text/lookup/StringLookupFactory.java
@@ -433,6 +433,38 @@ public final class StringLookupFactory {
     }
 
     /**
+     * Returns the UrlDecoderStringLookup singleton instance.
+     * <p>
+     *  Decodes URL Strings using the UTF-8 encoding.
+     * </p>
+     * <p>
+     * For example: "Hello%20World%21" becomes "Hello World!".
+     * </p>
+     *
+     * @return the UrlStringLookup singleton instance.
+     * @since 1.6
+     */
+    public StringLookup urlDecoderStringLookup() {
+        return UrlDecoderStringLookup.INSTANCE;
+    }
+
+    /**
+     * Returns the UrlDecoderStringLookup singleton instance.
+     * <p>
+     *  Decodes URL Strings using the UTF-8 encoding.
+     * </p>
+     * <p>
+     * For example: "Hello World!" becomes "Hello+World%21".
+     * </p>
+     *
+     * @return the UrlStringLookup singleton instance.
+     * @since 1.6
+     */
+    public StringLookup urlEncoderStringLookup() {
+        return UrlEncoderStringLookup.INSTANCE;
+    }
+
+    /**
      * Returns the UrlStringLookup singleton instance.
      * <p>
      * Looks up the value for the key in the format "CharsetName:URL".

Reply via email to