All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.MatrixEnumeration

java.lang.Object
   |
   +----symantec.itools.awt.MatrixEnumeration

public final class MatrixEnumeration
extends Object
implements Enumeration
This class is used to enumerate Matrix elements. Enumeration is used to sequentially scan through all the elements in a Matrix one at a time.

See Also:
Matrix, Enumeration

Constructor Index

 o MatrixEnumeration(Matrix)
Constructs a matrix enumerator for the given Matrix.

Method Index

 o advanceTo(int)
Skips enumeration ahead to the start of the given row.
 o currCol()
Returns the column number of the current element.
 o currRow()
Returns the row number of the current element.
 o hasMoreElements()
Returns true if more elements are available to enumerate.
 o hasMoreRows()
Returns true if more rows are available to enumerate.
 o nextElement()
Returns the next element.
 o nextRow()
Skips enumeration ahead to the start of the next row.

Constructors

 o MatrixEnumeration
  public MatrixEnumeration(Matrix matrix)
Constructs a matrix enumerator for the given Matrix.

Methods

 o hasMoreElements
  public boolean hasMoreElements()
Returns true if more elements are available to enumerate. This is a standard Java Enumeration interface method.

Returns:
true if more elements available, false if done enumerating
 o hasMoreRows
  public boolean hasMoreRows()
Returns true if more rows are available to enumerate.

 o nextElement
  public Object nextElement()
Returns the next element. This is a standard Java Enumeration interface method.

 o currRow
  public int currRow()
Returns the row number of the current element.

 o currCol
  public int currCol()
Returns the column number of the current element.

 o nextRow
  public Object nextRow()
Skips enumeration ahead to the start of the next row.

Returns:
the first element in the next row.
 o advanceTo
  public Object advanceTo(int r) throws IllegalArgumentException
Skips enumeration ahead to the start of the given row.

Parameters:
r - the row to skip ahead to. Must be greater than the current row
Returns:
the first element in the given row

All Packages  Class Hierarchy  This Package  Previous  Next  Index