Enum Class URLCoder.URIPart
- All Implemented Interfaces:
Serializable, Comparable<URLCoder.URIPart>, Constable
- Enclosing class:
URLCoder
Enumeration to identify the parts of a URI.
Contains methods to indicate whether a given character is valid in a specific URI component.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanisValid(char c) Indicates whether the given character is allowed in this URI component.static URLCoder.URIPartReturns the enum constant of this class with the specified name.static URLCoder.URIPart[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNRESERVED
-
SCHEME
-
USER_INFO
-
HOST
-
PORT
-
PATH
-
PATH_SEGMENT
-
QUERY
-
QUERY_PARAM
-
FRAGMENT
-
-
Constructor Details
-
URIPart
private URIPart()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isValid
public abstract boolean isValid(char c) Indicates whether the given character is allowed in this URI component.- Returns:
trueif the character is allowed;falseotherwise
-