@HtmlLink(nameProperty="name", hrefProperty="href") 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 href,
Object... hrefArgs)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(LinkString o) |
boolean |
equals(Object o) |
String |
getHref()
Bean property getter:
|
String |
getName()
Bean property getter:
|
int |
hashCode() |
LinkString |
setHref(String href)
Bean property setter:
|
LinkString |
setHref(String href,
Object... args)
Bean property setter:
|
LinkString |
setName(String name)
Bean property setter:
|
String |
toString()
Returns the name so that the
PojoQuery class can search against it. |
public LinkString()
public LinkString(String name, String href, Object... hrefArgs)
name
- Corresponds to the text inside of the href
- Corresponds to the value of the hrefArgs
- Optional arguments for MessageFormat
style arguments in the href.public String getName()
Corresponds to the text inside of the
public LinkString setName(String name)
name
- The new value for the public String getHref()
Corresponds to the value of the
public LinkString setHref(String href)
href
- The new value for the public LinkString setHref(String href, Object... args)
Same as setHref(String)
except allows for MessageFormat
style arguments.
href
- 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>
Copyright © 2018 Apache. All rights reserved.