Package org.apache.juneau.bean
Class LinkString
java.lang.Object
org.apache.juneau.bean.LinkString
- All Implemented Interfaces:
Comparable<LinkString>
- Direct Known Subclasses:
DirectoryResource.Action,LogsResource.Action
@HtmlLink
@Bean(findFluentSetters=true)
public class LinkString
extends Object
implements Comparable<LinkString>
Simple bean that implements a hyperlink for the HTML serializer.
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 Summary
ConstructorsConstructorDescriptionNo-arg constructor.LinkString(String name, String uri, Object... uriArgs) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintbooleangetName()Bean property getter:name .getUri()Bean property getter:uri .inthashCode()Bean property setter:name .Bean property fluent setter:uri .Bean property fluent setter:uri .Bean property setter:uri .toString()Returns the name so that theObjectSearcherclass can search against it.
-
Constructor Details
-
LinkString
public LinkString()No-arg constructor. -
LinkString
Constructor.- Parameters:
name- Corresponds to the text inside of the<A> element.uri- Corresponds to the value of thehref attribute of the<A> element.uriArgs- Optional arguments forMessageFormatstyle arguments in the href.
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<LinkString>
-
equals
-
getName
Bean property getter:name .Corresponds to the text inside of the
<A> element.- Returns:
- The property value, or
null if it is not set.
-
getUri
Bean property getter:uri .Corresponds to the value of the
href attribute of the<A> element.- Returns:
- The property value, or
null if it is not set.
-
hashCode
-
setName
Bean property setter:name .Corresponds to the text inside of the
<A> element.- Parameters:
value- The new value for this property.
Can benull to unset the property.- Returns:
- This object
-
setUri
Bean property setter:uri .Corresponds to the value of the
href attribute of the<A> element.- Parameters:
value- The new value for this property.
Can benull to unset the property.- Returns:
- This object
-
setUri
Bean property fluent setter:uri .Corresponds to the value of the
href attribute of the<A> element.- Parameters:
value- The new value for this property.
Can benull to unset the property.- Returns:
- This object.
-
setUri
Bean property fluent setter:uri .Corresponds to the value of the
href attribute of the<A> element.- Parameters:
value- The new value for this property.
Can benull to unset the property.args-MessageFormat-style arguments in the URL.- Returns:
- This object.
-
toString
Returns the name so that theObjectSearcherclass can search against it.
-