Package com.mastfrog.url
Class PathElement
java.lang.Object
com.mastfrog.url.PathElement
- All Implemented Interfaces:
URLComponent,Serializable
One element of a URL's path.
- Author:
- Tim Boudreau
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPathElement(String element) PathElement(String element, boolean trailingSlash) PathElement(String element, boolean trailingSlash, boolean noEncode) -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend this component to a StringBuilder.voidappendTo(StringBuilder sb, boolean includeTrailingSlashIfPresent) booleanbooleanextensionEquals(String ext) Get a human-readable, localized name for this part of the URL.inthashCode()booleanbooleanisValid()Determine if this component is in compliance with the RFCs governing URLs and DNS.toString()
-
Constructor Details
-
PathElement
-
PathElement
-
PathElement
-
-
Method Details
-
isValid
public boolean isValid()Description copied from interface:URLComponentDetermine if this component is in compliance with the RFCs governing URLs and DNS.- Specified by:
isValidin interfaceURLComponent- Returns:
- True if this component is valid.
-
toString
-
getComponentName
Description copied from interface:URLComponentGet a human-readable, localized name for this part of the URL. Useful if an error message needs to be shown.- Specified by:
getComponentNamein interfaceURLComponent- Returns:
- The component name
-
appendTo
Description copied from interface:URLComponentAppend this component to a StringBuilder.- Specified by:
appendToin interfaceURLComponent- Parameters:
sb- A StringBuilder
-
appendTo
-
equals
-
hashCode
public int hashCode() -
isProbableFileReference
public boolean isProbableFileReference() -
extension
-
extensionEquals
-