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
-
MatrixEnumeration(Matrix)
- Constructs a matrix enumerator for the given Matrix.
-
advanceTo(int)
- Skips enumeration ahead to the start of the given row.
-
currCol()
- Returns the column number of the current element.
-
currRow()
- Returns the row number of the current element.
-
hasMoreElements()
- Returns true if more elements are available to enumerate.
-
hasMoreRows()
- Returns true if more rows are available to enumerate.
-
nextElement()
- Returns the next element.
-
nextRow()
- Skips enumeration ahead to the start of the next row.
MatrixEnumeration
public MatrixEnumeration(Matrix matrix)
- Constructs a matrix enumerator for the given Matrix.
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
hasMoreRows
public boolean hasMoreRows()
- Returns true if more rows are available to enumerate.
nextElement
public Object nextElement()
- Returns the next element.
This is a standard Java Enumeration interface method.
currRow
public int currRow()
- Returns the row number of the current element.
currCol
public int currCol()
- Returns the column number of the current element.
nextRow
public Object nextRow()
- Skips enumeration ahead to the start of the next row.
- Returns:
- the first element in the next row.
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