public final class Href extends Object implements CharSequence
The class is immutable and thread-safe.
Modifier and Type | Method and Description |
---|---|
char |
charAt(int index) |
int |
length() |
Iterable<String> |
param(String key)
Get query param.
|
String |
path()
Get path part of the HREF.
|
Href |
path(String suffix)
Add this path to the URI.
|
CharSequence |
subSequence(int start,
int end) |
String |
toString() |
Href |
with(String key,
String value)
Add this extra param.
|
Href |
without(String key)
Without this query param.
|
public Href(String txt)
txt
- Text of the linkpublic int length()
length
in interface CharSequence
public char charAt(int index)
charAt
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public String toString()
toString
in interface CharSequence
toString
in class Object
public String path()
public Iterable<String> param(String key)
key
- Param namepublic Href path(String suffix)
suffix
- The suffixpublic Href with(String key, String value)
key
- Key of the paramvalue
- The valueCopyright © 2015 Takes. All rights reserved.