org.nuiton.math.matrix
Class MatrixIteratorImpl

java.lang.Object
  extended by org.nuiton.math.matrix.MatrixIteratorImpl
All Implemented Interfaces:
BasicMatrixIterator, MatrixIterator

public class MatrixIteratorImpl
extends Object
implements MatrixIterator

MatrixIteratorImpl. Created: 28 oct. 2004

Version:
$Revision: 323 $ Mise a jour: $Date: 2011-01-22 10:32:20 +0100 (sam., 22 janv. 2011) $ par : $Author: tchemit $
Author:
Benjamin Poussin

Field Summary
protected  BasicMatrixIterator iterator
           
protected  int pos
           
protected  List<?>[] semantics
           
 
Constructor Summary
MatrixIteratorImpl(BasicMatrixIterator iterator, List<?>[] semantics)
           
 
Method Summary
 int[] getCoordinates()
          Retourne les coordonnés de l'élément.
 Object[] getSemanticsCoordinates()
          Retourne les coordonnés de l'élément, en sémantique.
 double getValue()
          Retourne la valeur courant pointé par l'iterator.
 boolean hasNext()
          Retourne vrai s'il existe un suivant.
 boolean next()
          Passe à l'élément suivant.
 void setValue(double value)
          Modifie la valeur courant pointé par l'iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iterator

protected BasicMatrixIterator iterator

semantics

protected List<?>[] semantics

pos

protected int pos
Constructor Detail

MatrixIteratorImpl

public MatrixIteratorImpl(BasicMatrixIterator iterator,
                          List<?>[] semantics)
Parameters:
iterator - la matrice sur lequel l'iterator doit travailler
semantics - la semantique de matrix, si matrix n'a pas de semantique alors il faut passer null
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: BasicMatrixIterator
Retourne vrai s'il existe un suivant.

Specified by:
hasNext in interface BasicMatrixIterator
Returns:
vrai s'il y a un suivant, faux sinon

next

public boolean next()
Description copied from interface: BasicMatrixIterator
Passe à l'élément suivant.

Specified by:
next in interface BasicMatrixIterator
Returns:
vrai s'il y a un suivant, faux sinon

getCoordinates

public int[] getCoordinates()
Description copied from interface: BasicMatrixIterator
Retourne les coordonnés de l'élément.

Specified by:
getCoordinates in interface BasicMatrixIterator
Returns:
current element coordinates

getValue

public double getValue()
Description copied from interface: BasicMatrixIterator
Retourne la valeur courant pointé par l'iterator.

Specified by:
getValue in interface BasicMatrixIterator
Returns:
current element value

setValue

public void setValue(double value)
Description copied from interface: BasicMatrixIterator
Modifie la valeur courant pointé par l'iterator.

Specified by:
setValue in interface BasicMatrixIterator
Parameters:
value - new value to set to current element

getSemanticsCoordinates

public Object[] getSemanticsCoordinates()
Description copied from interface: MatrixIterator
Retourne les coordonnés de l'élément, en sémantique. Si la matrice n'a pas de sémantique alors retourne null.

Specified by:
getSemanticsCoordinates in interface MatrixIterator
Returns:
current element semantics


Copyright © 2004-2011 CodeLutin. All Rights Reserved.