-
- All Implemented Interfaces:
-
kotlin.Comparable
public class NormUrl implements Comparable<NormUrl>
A normalized url.
Every NormUrl contains two urls: url and href, url stands for Uniform Resource Locator, both for external webpage and internal database record, and href stands for Hyperlink Reference, which is a url extracted from a HTML document.
The href is the first choice to locate a resource, because it's extracted from a HTML document without modification while the url might be normalized.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classNormUrl.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Stringspecprivate final StringhrefSpecprivate final Stringargsprivate final StringconfiguredUrlprivate final BooleanisNilprivate final BooleanisNotNilprivate final URLurlprivate final LoadOptionsoptionsprivate URLhrefprivate UrlAwaredetail
-
Constructor Summary
Constructors Constructor Description NormUrl(String spec, LoadOptions options, String hrefSpec, UrlAware detail)NormUrl(URL url, LoadOptions options, URL href, UrlAware detail)
-
Method Summary
Modifier and Type Method Description final StringgetSpec()final StringgetHrefSpec()final StringgetArgs()final StringgetConfiguredUrl()final BooleangetIsNil()final BooleangetIsNotNil()final URLgetUrl()final LoadOptionsgetOptions()final URLgetHref()final UnitsetHref(URL href)final UrlAwaregetDetail()final UnitsetDetail(UrlAware detail)final Stringcomponent1()final LoadOptionscomponent2()IntegerhashCode()Booleanequals(Object other)IntegercompareTo(NormUrl other)StringtoString()-
-
Constructor Detail
-
NormUrl
NormUrl(String spec, LoadOptions options, String hrefSpec, UrlAware detail)
-
NormUrl
NormUrl(URL url, LoadOptions options, URL href, UrlAware detail)
-
-
Method Detail
-
getHrefSpec
final String getHrefSpec()
-
getConfiguredUrl
final String getConfiguredUrl()
-
getIsNotNil
final Boolean getIsNotNil()
-
getOptions
final LoadOptions getOptions()
-
getDetail
final UrlAware getDetail()
-
component1
final String component1()
-
component2
final LoadOptions component2()
-
-
-
-