Package io.urf.surf
Class SURF.Handle
- java.lang.Object
-
- io.urf.surf.SURF.Handle
-
- Enclosing class:
- SURF
public static final class SURF.Handle extends java.lang.ObjectUtilities for working with SURF handles.- Author:
- Garret Wilson
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.regex.PatternPATTERNRegular expression pattern to match a SURF handle.static charSEGMENT_DELIMITERThe delimiter used to separate segments of a SURF handle.
-
Constructor Summary
Constructors Constructor Description Handle()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringcheckArgumentValid(java.lang.String string)Confirms that the given string conforms to the rules for a SURF handle.static booleanisBeginCharacter(int c)Determines if the given character is valid to begin a SURF handle.static booleanisValid(java.lang.String string)Determines whether the given string conforms to the rules for a SURF handle.
-
-
-
Field Detail
-
SEGMENT_DELIMITER
public static final char SEGMENT_DELIMITER
The delimiter used to separate segments of a SURF handle.- See Also:
- Constant Field Values
-
PATTERN
public static final java.util.regex.Pattern PATTERN
Regular expression pattern to match a SURF handle.
-
-
Method Detail
-
isBeginCharacter
public static final boolean isBeginCharacter(int c)
Determines if the given character is valid to begin a SURF handle. A SURF handle begins with a name token.- Parameters:
c- The character to check.- Returns:
trueif the character is a SURF handle begin character.- See Also:
SURF.Name.isTokenBeginCharacter(int)
-
isValid
public static boolean isValid(java.lang.String string)
Determines whether the given string conforms to the rules for a SURF handle.- Parameters:
string- The string to test.- Returns:
trueif the string is a valid SURF handle.- Throws:
java.lang.NullPointerException- if the given string isnull.- See Also:
PATTERN
-
checkArgumentValid
public static java.lang.String checkArgumentValid(java.lang.String string)
Confirms that the given string conforms to the rules for a SURF handle.- Parameters:
string- The string to check.- Returns:
- The given string.
- Throws:
java.lang.NullPointerException- if the given string isnull.java.lang.IllegalArgumentException- if the given string does not conform to the rules for a SURF handle.- See Also:
PATTERN
-
-