Class KUrl
java.lang.Object
org.nustaq.kontraktor.webapp.javascript.KUrl
- All Implemented Interfaces:
Serializable
Created by ruedi on 19/07/15.
url wrapper. note '//www.x.y' style not supported
FIXME: replace/subclass with HttpUrl from okhttp lib
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanString[]getName()inthashCode()booleanmangled()mangled(boolean allowFileSep) protected voidprotected Stringremoves 'www' in case and removes country code.booleanstartsWith(KUrl base) static StringstripDoubleSeps(String url) toString()toUrlString(boolean withProtocol) unified()removes www, protocol and country
-
Constructor Details
-
KUrl
-
KUrl
-
KUrl
-
-
Method Details
-
stripDoubleSeps
-
normalize
protected void normalize() -
concat
-
concat
-
getProtocol
-
getElements
-
getExtension
-
getFileNameNoExtension
-
toUrlString
-
mangled
-
mangled
-
toUrlString
-
getParentURL
-
getName
-
equals
-
equalsIgnoreProtocol
-
hashCode
public int hashCode() -
toString
-
isRelative
public boolean isRelative() -
prepend
-
startsWith
-
unified
removes www, protocol and country- Returns:
-
normalizeDomain
removes 'www' in case and removes country code. EXPECT protocol to be absent- Parameters:
s-- Returns:
-
getDomain
-