jbcl.model Package
java.lang.Object +----com.borland.jbcl.model.MatrixLocation
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.
public int columnThe location column.
public int rowThe location row.
public MatrixLocation()Constructs a
MatrixLocation
object with no assigned location.
public MatrixLocation(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
MatrixLocation
makes a copy of.
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
column
public Object clone()Returns a copy of the object at this location.
Overrides: java.lang.Object.clone()
public boolean equals(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
Overrides: java.lang.Object.equals(Object)
public int hashCode()An integer bit representation of this matrix location.
Overrides: java.lang.Object.hashCode()
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()