borland Packages  Class Hierarchy  jbcl.model Package  Index 

MatrixLocation component

java.lang.Object
   +----borland.jbcl.model.MatrixLocation

About the MatrixLocation component

Variables  Constructors  Properties  Methods  

Implements Serializable, Cloneable

A MatrixLocation represents a single row and column location (a cell) in a matrix container. Specify the row and column values of a matrix location as zero-based indexes. For example, an item in the third row and in the third column of the matrix will have row and column values of 2.

To determine whether the location of a specified object is the same as this location, use the equals() method. To convert the location to a string, call toString(). The clone() method returns a copy of the object at the location.


MatrixLocation variables

Variables implemented in this class

MatrixLocation constructors

MatrixLocation properties

*Read-only properties **Write-only properties

Properties implemented in java.lang.Object

MatrixLocation methods

Methods implemented in this class

Methods implemented in java.lang.Object


MatrixLocation variables

column

  public int column
The location column.

row

  public int row
The location row.

MatrixLocation constructors

MatrixLocation()

  public MatrixLocation()
Constructs a MatrixLocation object with no assigned location.

MatrixLocation(borland.jbcl.model.MatrixLocation)

  public MatrixLocation(borland.jbcl.model.MatrixLocation location)
Constructs a MatrixLocation object and assigns the row and column values to the same row and column values of the location parameter; creates a copy of another MatrixLocation object.

Parameters:

location
The matrix location object that MatrixLocation makes a copy of.

MatrixLocation(int, int)

  public MatrixLocation(int row, int column)
Constructs a MatrixLocation object using the specified row and column parameters. Specify the row and colum values as zero-based indexes.

Parameters:

row
A zero-based index that specifies the row of the location.
column
A zero-based index that specifies the column of the location.

MatrixLocation methods

clone()

  public Object clone()
Returns a copy of the object at this location.

Overrides: java.lang.Object.clone()

equals(java.lang.Object)

  public boolean equals(java.lang.Object that)
Determines whether the location of a specified object in a matrix is the same as this matrix location. If equals returns true, the object specified with the that parameter is the same as this MatrixLocation.

Parameters:

that
The data object in a matrix.

Overrides: java.lang.Object.equals(Object)

hashCode()

  public int hashCode()
An integer bit representation of this matrix location.

Overrides: java.lang.Object.hashCode()

toString()

  public String toString()
Converts this matrix location to a string representation. For example, the result of a location in row 8 and column 9 would be this string: "row=8,column=9"

Overrides: java.lang.Object.toString()