-
- All Implemented Interfaces:
-
kotlin.Comparable
public class NormUrl implements Comparable<NormUrl>
NormUrl stands for
normal url, which means the url is final and will be used to locate the resource.Every normal url contains two urls: a
urland ahref,urlstands for Uniform Resource Locator, both for external webpage and internal database record, andhrefstands for Hyperlink Reference, which contains a url extracted from an HTML document.Hrefis the first choice to locate resources, because it's extracted from the HTML document without modification, whileurlis typically 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 Stringreferrerprivate 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 StringgetReferrer()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()
-
getReferrer
final String getReferrer()
-
getIsNotNil
final Boolean getIsNotNil()
-
getOptions
final LoadOptions getOptions()
-
getDetail
final UrlAware getDetail()
-
setDetail
final Unit setDetail(UrlAware detail)
-
component1
final String component1()
-
component2
final LoadOptions component2()
-
-
-
-