Top Description Fields Constructors Methods
org.apache.poi.hssf.usermodel

public Class HSSFHyperlink

extends Object
implements Hyperlink, Duplicatable
Class Inheritance
All Implemented Interfaces
org.apache.poi.common.Duplicatable, org.apache.poi.ss.usermodel.Hyperlink, org.apache.poi.common.usermodel.Hyperlink
Imports
org.apache.poi.common.Duplicatable, org.apache.poi.common.usermodel.HyperlinkType, org.apache.poi.hssf.record.HyperlinkRecord, org.apache.poi.ss.usermodel.Hyperlink, org.apache.poi.util.Internal

Represents an Excel hyperlink.

Field Summary

Modifier and TypeField and Description
protected final HyperlinkRecord
record

Low-level record object that stores the actual hyperlink data

Constructor Summary

AccessConstructor and Description

Method Summary

Modifier and TypeMethod and Description
public Duplicatable

Returns:

a new HSSFHyperlink based on this
copy
()

Implements org.apache.poi.common.Duplicatable.copy.

public boolean

Returns:

whether the objects have the same HyperlinkRecord
equals
(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public String

Returns:

the address of this hyperlink
getAddress
()

Implements org.apache.poi.common.usermodel.Hyperlink.getAddress.

Hyperlink address.

public int

Returns:

the 0-based column of the first cell that contains the hyperlink
getFirstColumn
()

Implements org.apache.poi.ss.usermodel.Hyperlink.getFirstColumn.

Return the column of the first cell that contains the hyperlink

public int

Returns:

the 0-based row of the cell that contains the hyperlink
getFirstRow
()

Implements org.apache.poi.ss.usermodel.Hyperlink.getFirstRow.

Return the row of the first cell that contains the hyperlink

public String

Returns:

text to display
getLabel
()

Implements org.apache.poi.common.usermodel.Hyperlink.getLabel.

Return text label for this hyperlink

public int

Returns:

the 0-based column of the last cell that contains the hyperlink
getLastColumn
()

Implements org.apache.poi.ss.usermodel.Hyperlink.getLastColumn.

Return the column of the last cell that contains the hyperlink

public int

Returns:

the 0-based row of the last cell that contains the hyperlink
getLastRow
()

Implements org.apache.poi.ss.usermodel.Hyperlink.getLastRow.

Return the row of the last cell that contains the hyperlink

public String
public String
private static HyperlinkType
public HyperlinkType

Returns:

the type of this hyperlink
getType
()

Implements org.apache.poi.common.usermodel.Hyperlink.getType.

Return the type of this hyperlink

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public void
setAddress(String
the address of this hyperlink
address
)

Implements org.apache.poi.common.usermodel.Hyperlink.setAddress.

Hyperlink address.

public void
setFirstColumn(int
the 0-based column of the first cell that contains the hyperlink
col
)

Implements org.apache.poi.ss.usermodel.Hyperlink.setFirstColumn.

Set the column of the first cell that contains the hyperlink

public void
setFirstRow(int
the 0-based row of the first cell that contains the hyperlink
row
)

Implements org.apache.poi.ss.usermodel.Hyperlink.setFirstRow.

Set the row of the first cell that contains the hyperlink

public void
setLabel(String
text label for this hyperlink
label
)

Implements org.apache.poi.common.usermodel.Hyperlink.setLabel.

Sets text label for this hyperlink

public void
setLastColumn(int
the 0-based column of the last cell that contains the hyperlink
col
)

Implements org.apache.poi.ss.usermodel.Hyperlink.setLastColumn.

Set the column of the last cell that contains the hyperlink

public void
setLastRow(int
the 0-based row of the last cell that contains the hyperlink
row
)

Implements org.apache.poi.ss.usermodel.Hyperlink.setLastRow.

Set the row of the last cell that contains the hyperlink

public void
setShortFilename(String
the path to a file this hyperlink points to, e.g. 'readme.txt'
shortFilename
)

Convenience method equivalent to setAddress(String)

public void
setTextMark(String
the place in worksheet this hyperlink refers to, e.g. 'Target Sheet'!A1'
textMark
)

Convenience method equivalent to setAddress(String)

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

recordback to summary
protected final HyperlinkRecord record

Low-level record object that stores the actual hyperlink data

Constructor Detail

Method Detail

copyback to summary
public Duplicatable copy()

Implements org.apache.poi.common.Duplicatable.copy.

Returns:Duplicatable

a new HSSFHyperlink based on this

Annotations
@Override
Since
POI 5.1.0
equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
other:Object

the reference object with which to compare.

Returns:boolean

whether the objects have the same HyperlinkRecord

Annotations
@Override
getAddressback to summary
public String getAddress()

Implements org.apache.poi.common.usermodel.Hyperlink.getAddress.

Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.

Returns:String

the address of this hyperlink

Annotations
@Override
getFirstColumnback to summary
public int getFirstColumn()

Implements org.apache.poi.ss.usermodel.Hyperlink.getFirstColumn.

Return the column of the first cell that contains the hyperlink

Returns:int

the 0-based column of the first cell that contains the hyperlink

Annotations
@Override
getFirstRowback to summary
public int getFirstRow()

Implements org.apache.poi.ss.usermodel.Hyperlink.getFirstRow.

Return the row of the first cell that contains the hyperlink

Returns:int

the 0-based row of the cell that contains the hyperlink

Annotations
@Override
getLabelback to summary
public String getLabel()

Implements org.apache.poi.common.usermodel.Hyperlink.getLabel.

Return text label for this hyperlink

Returns:String

text to display

Annotations
@Override
getLastColumnback to summary
public int getLastColumn()

Implements org.apache.poi.ss.usermodel.Hyperlink.getLastColumn.

Return the column of the last cell that contains the hyperlink

Returns:int

the 0-based column of the last cell that contains the hyperlink

Annotations
@Override
getLastRowback to summary
public int getLastRow()

Implements org.apache.poi.ss.usermodel.Hyperlink.getLastRow.

Return the row of the last cell that contains the hyperlink

Returns:int

the 0-based row of the last cell that contains the hyperlink

Annotations
@Override
getShortFilenameback to summary
public String getShortFilename()
getTextMarkback to summary
public String getTextMark()
getTypeback to summary
private static HyperlinkType getType(HyperlinkRecord record)
getTypeback to summary
public HyperlinkType getType()

Implements org.apache.poi.common.usermodel.Hyperlink.getType.

Return the type of this hyperlink

Returns:HyperlinkType

the type of this hyperlink

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
setAddressback to summary
public void setAddress(String address)

Implements org.apache.poi.common.usermodel.Hyperlink.setAddress.

Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.

Parameters
address:String

the address of this hyperlink

Annotations
@Override
setFirstColumnback to summary
public void setFirstColumn(int col)

Implements org.apache.poi.ss.usermodel.Hyperlink.setFirstColumn.

Set the column of the first cell that contains the hyperlink

Parameters
col:int

the 0-based column of the first cell that contains the hyperlink

Annotations
@Override
setFirstRowback to summary
public void setFirstRow(int row)

Implements org.apache.poi.ss.usermodel.Hyperlink.setFirstRow.

Set the row of the first cell that contains the hyperlink

Parameters
row:int

the 0-based row of the first cell that contains the hyperlink

Annotations
@Override
setLabelback to summary
public void setLabel(String label)

Implements org.apache.poi.common.usermodel.Hyperlink.setLabel.

Sets text label for this hyperlink

Parameters
label:String

text label for this hyperlink

Annotations
@Override
setLastColumnback to summary
public void setLastColumn(int col)

Implements org.apache.poi.ss.usermodel.Hyperlink.setLastColumn.

Set the column of the last cell that contains the hyperlink

Parameters
col:int

the 0-based column of the last cell that contains the hyperlink

Annotations
@Override
setLastRowback to summary
public void setLastRow(int row)

Implements org.apache.poi.ss.usermodel.Hyperlink.setLastRow.

Set the row of the last cell that contains the hyperlink

Parameters
row:int

the 0-based row of the last cell that contains the hyperlink

Annotations
@Override
setShortFilenameback to summary
public void setShortFilename(String shortFilename)

Convenience method equivalent to setAddress(String)

Parameters
shortFilename:String

the path to a file this hyperlink points to, e.g. 'readme.txt'

setTextMarkback to summary
public void setTextMark(String textMark)

Convenience method equivalent to setAddress(String)

Parameters
textMark:String

the place in worksheet this hyperlink refers to, e.g. 'Target Sheet'!A1'