Expseq.iterator - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : OpenMaple : Java Application Programming Interface : Expseq Class : OpenMaple/Java/Expseq/iterator

Expseq.iterator

return iterator over Expseq

 

Calling Sequence

Description

Examples

Calling Sequence

java.util.Iterator<Algebraic> iterator( )

Description

• 

The iterator function returns an Iterator object which can be used to iterate over the Expseq.

Examples

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