Código:
Lo que necesito evaluar es esto: if ( theEndPoints.next() != 3 ) import java.util.ArrayList; import java.util.Iterator; public class iterador { public static void main(String args[]) {} public iterador (){ ArrayList<Integer> endPoints = new ArrayList<Integer>(); int ePoints = 0; if(!endPoints.contains(5)) // avpid duplicates { endPoints.add(5); // capture the end points for new edges ePoints++; }; // get the vertex for Edge. Iterator theEndPoints = endPoints.iterator(); while (theEndPoints.hasNext()) { if ( theEndPoints.next() != 3 ) { System.out.println(theEndPoints.next()); } } } }