Package io.keikai.axyra.sheets.content
Record Class Hyperlink
java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.content.Hyperlink
A cell hyperlink.
display and tooltip may be null
(the address is shown when there is no display text).
The address string decides the link kind: a #-prefixed address
is an internal (in-workbook) reference, a mailto: address is an
email link, anything else is an external URL / file target.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.display()Returns the value of thedisplayrecord component.static HyperlinkAn email hyperlink (mailto:).final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static HyperlinkAn internal (in-workbook) hyperlink tocellRef, e.g.booleanisEmail()Whether this is an email (mailto:) link.booleanWhether this is an internal (in-workbook) reference.tooltip()Returns the value of thetooltiprecord component.final StringtoString()Returns a string representation of this record class.static HyperlinkA URL hyperlink with no display text or tooltip.static HyperlinkA URL hyperlink with display text.
-
Constructor Details
-
Hyperlink
Creates an instance of aHyperlinkrecord class.- Parameters:
address- the value for theaddressrecord componentdisplay- the value for thedisplayrecord componenttooltip- the value for thetooltiprecord component
-
-
Method Details
-
url
A URL hyperlink with no display text or tooltip. -
url
A URL hyperlink with display text. -
internal
An internal (in-workbook) hyperlink tocellRef, e.g."Sheet2!B5"or a defined name. The stored address gains the#prefix Excel uses for location links if not already present.- Throws:
NullPointerException- ifcellRefis null
-
email
An email hyperlink (mailto:).subjectmay benull; when present it is carried as the?subject=query, matching Excel's email links.subjectis appended as given and not percent-encoded; encode spaces as%20yourself. Amailto:prefix onaddressis not doubled.- Throws:
NullPointerException- ifaddressis null
-
isInternal
public boolean isInternal()Whether this is an internal (in-workbook) reference. -
isEmail
public boolean isEmail()Whether this is an email (mailto:) link. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
display
Returns the value of thedisplayrecord component.- Returns:
- the value of the
displayrecord component
-
tooltip
Returns the value of thetooltiprecord component.- Returns:
- the value of the
tooltiprecord component
-