org.springframework.web.util
Enum UriComponents.Type

java.lang.Object
  extended by java.lang.Enum<UriComponents.Type>
      extended by org.springframework.web.util.UriComponents.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<UriComponents.Type>
Enclosing class:
UriComponents

static enum UriComponents.Type
extends java.lang.Enum<UriComponents.Type>

Enumeration used to identify the parts of a URI.

Contains methods to indicate whether a given character is valid in a specific URI component.

Author:
Arjen Poutsma
See Also:
RFC 3986

Enum Constant Summary
AUTHORITY
           
FRAGMENT
           
HOST
           
PATH
           
PATH_SEGMENT
           
PORT
           
QUERY
           
QUERY_PARAM
           
SCHEME
           
USER_INFO
           
 
Method Summary
abstract  boolean isAllowed(int c)
          Indicates whether the given character is allowed in this URI component.
protected  boolean isAlpha(int c)
          Indicates whether the given character is in the ALPHA set.
protected  boolean isDigit(int c)
          Indicates whether the given character is in the DIGIT set.
protected  boolean isGenericDelimiter(int c)
          Indicates whether the given character is in the gen-delims set.
protected  boolean isPchar(int c)
          Indicates whether the given character is in the pchar set.
protected  boolean isReserved(char c)
          Indicates whether the given character is in the reserved set.
protected  boolean isSubDelimiter(int c)
          Indicates whether the given character is in the sub-delims set.
protected  boolean isUnreserved(int c)
          Indicates whether the given character is in the unreserved set.
static UriComponents.Type valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static UriComponents.Type[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SCHEME

public static final UriComponents.Type SCHEME

AUTHORITY

public static final UriComponents.Type AUTHORITY

USER_INFO

public static final UriComponents.Type USER_INFO

HOST

public static final UriComponents.Type HOST

PORT

public static final UriComponents.Type PORT

PATH

public static final UriComponents.Type PATH

PATH_SEGMENT

public static final UriComponents.Type PATH_SEGMENT

QUERY

public static final UriComponents.Type QUERY

QUERY_PARAM

public static final UriComponents.Type QUERY_PARAM

FRAGMENT

public static final UriComponents.Type FRAGMENT
Method Detail

values

public static UriComponents.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (UriComponents.Type c : UriComponents.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static UriComponents.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

isAllowed

public abstract boolean isAllowed(int c)
Indicates whether the given character is allowed in this URI component.

Parameters:
c - the character
Returns:
true if the character is allowed; false otherwise

isAlpha

protected boolean isAlpha(int c)
Indicates whether the given character is in the ALPHA set.

See Also:
RFC 3986, appendix A

isDigit

protected boolean isDigit(int c)
Indicates whether the given character is in the DIGIT set.

See Also:
RFC 3986, appendix A

isGenericDelimiter

protected boolean isGenericDelimiter(int c)
Indicates whether the given character is in the gen-delims set.

See Also:
RFC 3986, appendix A

isSubDelimiter

protected boolean isSubDelimiter(int c)
Indicates whether the given character is in the sub-delims set.

See Also:
RFC 3986, appendix A

isReserved

protected boolean isReserved(char c)
Indicates whether the given character is in the reserved set.

See Also:
RFC 3986, appendix A

isUnreserved

protected boolean isUnreserved(int c)
Indicates whether the given character is in the unreserved set.

See Also:
RFC 3986, appendix A

isPchar

protected boolean isPchar(int c)
Indicates whether the given character is in the pchar set.

See Also:
RFC 3986, appendix A