commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1065220 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnescaper.java
Date Sun, 30 Jan 2011 08:08:42 GMT
Author: bayard
Date: Sun Jan 30 08:08:42 2011
New Revision: 1065220

URL: http://svn.apache.org/viewvc?rev=1065220&view=rev
Log:
Added javadoc

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnescaper.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnescaper.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnescaper.java?rev=1065220&r1=1065219&r2=1065220&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnescaper.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/translate/UnicodeUnescaper.java
Sun Jan 30 08:08:42 2011
@@ -33,9 +33,20 @@ public class UnicodeUnescaper extends Ch
 
     public static enum OPTION { escapePlus }
 
-    // TODO: Create an OptionsSet class to hide some of the conditional logic below
+    // TODO?: Create an OptionsSet class to hide some of the conditional logic below
     private final EnumSet<OPTION> options;
 
+    /**
+     * Create a UnicodeUnescaper.
+     *
+     * The constructor takes a list of options, only one of which is currently 
+     * available (whether to expect a plus sign after the 'u'). 
+     *
+     * For example, to handle "\\u+0047":
+     *    new UnicodeUnescaper(UnicodeUnescaper.OPTION.escapePlus)
+     *
+     * @param OPTION... options to apply to this unescaper
+     */
     public UnicodeUnescaper(OPTION... options) {
         if(options.length > 0) {
             this.options = EnumSet.copyOf(Arrays.asList(options));
@@ -44,7 +55,13 @@ public class UnicodeUnescaper extends Ch
         }
     }
 
-    public boolean isSet(OPTION opt) { 
+    /**
+     * Whether the passed in option is currently set.
+     *
+     * @param OPTION option to check state of
+     * @return whether the option is set
+     */
+    public boolean isSet(OPTION option) { 
         return (options == null) ? false : options.contains(opt);
     }
 



Mime
View raw message