Package org.apache.juneau.dto
Class LinkString
java.lang.Object
org.apache.juneau.dto.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.
See Also:
-
Constructor Summary
ConstructorDescriptionNo-arg constructor.LinkString
(String name, String uri, Object... uriArgs) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
getName()
Bean property getter:name .getUri()
Bean property getter:uri .int
hashCode()
Bean property setter:name .Bean property fluent setter:uri .Bean property fluent setter:uri .Bean property setter:uri .toString()
Returns the name so that theObjectSearcher
class 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 forMessageFormat
style arguments in the href.
-
-
Method Details
-
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.
-
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
-
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.
-
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 theObjectSearcher
class can search against it. -
compareTo
- Specified by:
compareTo
in interfaceComparable<LinkString>
-
equals
-
hashCode
-