iterator - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


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

 


Download Help Document