Expseq.iterator
return iterator over Expseq
Calling Sequence
Description
Examples
java.util.Iterator<Algebraic> iterator( )
The iterator function returns an Iterator object which can be used to iterate over the Expseq.
import java.util.Iterator;
import com.maplesoft.openmaple.*;
import com.maplesoft.externalcall.MapleException;
class Example
{
public static void main( String notused[] ) throws MapleException
String[] mapleArgs = { "java" };
Engine engine = new Engine( mapleArgs, new EngineCallBacksDefault(), null, null );
Expseq expseq = (Expseq)engine.evaluate( "(2,7.5,-1);" );
Iterator<Algebraic> it = expseq.iterator();
while (it.hasNext()) {
System.out.println( "Element: " + it.next() );
}
Executing this code produces the following output:
Element: 2
Element: 7
Element: 5
Element: -1
See Also
ExternalCalling/Java/MapleException
OpenMaple
OpenMaple/Java/Algebraic
OpenMaple/Java/API
OpenMaple/Java/Expseq
OpenMaple/Java/Expseq/assign
OpenMaple/Java/Expseq/select
OpenMaple/Java/List/iterator
OpenMaple/Java/Set/iterator
Download Help Document