java.lang.Object
io.jenetics.jpx.Link
- All Implemented Interfaces:
Serializable
Represents a link to an external resource (Web page, digital photo, video
clip, etc) with additional information.
- Since:
- 1.0
- Version:
- 1.2
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleangetHref()Return the hyperlink.getText()Return the hyperlink text.getType()Return the mime type of the hyperlinkinthashCode()static LinkCreate a newLinkobject with the givenhref.static LinkCreate a newLinkobject with the given parameters.static LinkCreate a newLinkobject with the givenhref.static LinkCreate a newLinkobject with the given parameters.toString()
-
Method Details
-
getHref
Return the hyperlink.- Returns:
- the hyperlink
-
getText
Return the hyperlink text.- Returns:
- the hyperlink text
-
getType
Return the mime type of the hyperlink- Returns:
- the mime type
-
hashCode
-
equals
-
toString
-
of
Create a newLinkobject with the given parameters.- Parameters:
href- the hyperlink (mandatory)text- the text of the hyperlink (optional)type- the mime type of the content, e.g.image/jpeg(optional)- Returns:
- a new
Linkobject with the given parameters - Throws:
NullPointerException- if the givenhrefisnull
-
of
Create a newLinkobject with the given parameters.- Parameters:
href- the hyperlink (mandatory)text- the text of the hyperlink (optional)type- the mime type of the content, e.g.image/jpeg(optional)- Returns:
- a new
Linkobject with the given parameters - Throws:
NullPointerException- if the givenhrefisnullIllegalArgumentException- if the givenhrefis not a valid URL
-
of
Create a newLinkobject with the givenhref.- Parameters:
href- the hyperlink (mandatory)- Returns:
- a new
Linkobject with the givenhref - Throws:
NullPointerException- if the givenhrefisnull
-
of
Create a newLinkobject with the givenhref.- Parameters:
href- the hyperlink (mandatory)- Returns:
- a new
Linkobject with the givenhref - Throws:
NullPointerException- if the givenhrefisnullIllegalArgumentException- if the givenhrefis not a valid URL
-