@HtmlLink @Bean(fluentSetters=true) public class LinkString extends Object implements Comparable<LinkString>
The name and url properties correspond to the following parts of a hyperlink in an HTML document...
When encountered by the HtmlSerializer
class, this object gets converted to a hyperlink.
All other serializers simply convert it to a simple bean.
Constructor and Description |
---|
LinkString()
No-arg constructor.
|
LinkString(String name,
String uri,
Object... uriArgs)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(LinkString o) |
boolean |
equals(Object o) |
String |
getHref()
Deprecated.
Use
getUri() |
String |
getName()
Bean property getter:
|
URI |
getUri()
Bean property getter:
|
int |
hashCode() |
LinkString |
name(String name)
Bean property setter:
|
LinkString |
setHref(String href)
Deprecated.
|
LinkString |
setHref(String href,
Object... args)
Deprecated.
|
LinkString |
setName(String name)
Deprecated.
Use
name(String) . |
String |
toString()
Returns the name so that the
PojoQuery class can search against it. |
LinkString |
uri(String uri)
Bean property setter:
|
LinkString |
uri(String uri,
Object... args)
Bean property setter:
|
public LinkString()
public LinkString(String name, String uri, Object... uriArgs)
name
- Corresponds to the text inside of the uri
- Corresponds to the value of the uriArgs
- Optional arguments for MessageFormat
style arguments in the href.public String getName()
Corresponds to the text inside of the
public LinkString name(String name)
name
- The new value for the public URI getUri()
Corresponds to the value of the
public LinkString uri(String uri)
uri
- The new value for the public LinkString uri(String uri, Object... args)
Same as uri(String)
except allows for MessageFormat
style arguments.
uri
- The new href.args
- Optional MessageFormat
-style arguments.public String toString()
PojoQuery
class can search against it.public int compareTo(LinkString o)
compareTo
in interface Comparable<LinkString>
@Deprecated public String getHref()
getUri()
@Deprecated public LinkString setName(String name)
name(String)
.@Deprecated public LinkString setHref(String href, Object... args)
uri(String,Object...)
.@Deprecated public LinkString setHref(String href)
uri(String,Object...)
.Copyright © 2018 Apache. All rights reserved.