Le 24/11/2011 08:32, Bastien Preuss a écrit :
Il semble que mon premier message ait été bloqué :
Bonjour,
Dans un script j’utilise le code suivant :
List<Strategy> liststrat = L2.getSemantic(1);
int[] indexStratagarder = new int[2];
for(Strategy s : liststrat){
if(s.getName().equals("PRO_Ligne_GN")) indexStratagarder [1] = listmet.indexOf(s);
else if(s.getName().equals("PRO_Ligne_CS")) indexStratagarder [2] = listmet.indexOf(s);
}
Mais j’obtiens l’erreur suivante :
Incompatible types
found : java.util.List<capture#513 of ?>
required : java.util.List<fr.ifremer.isisfish.entities.Strategy>
List<Strategy> listStrat = L2.getSementic(1);
Il manque un cast: List<Strategy> listStrat = (List<Strategy>)L2.getSementic(1); -- Éric Chatellier <chatellier@codelutin.com> Tel: 02.40.50.29.28 http://www.codelutin.com