entrySet - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Table.keySet

get Set view of keys in the Table

Table.entrySet

get Set view of key/value pairs in the Table

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

java.util.Set<Algebraic> keySet( )

java.util.Set<Map.Entry<Algebraic,Algebraic>> entrySet( )

Parameters

key

-

index to check

Description

• 

The keySet function returns a java.util.Set view of the keys in the Table.

• 

The entrySet function returns a java.util.Set of Map.Entry objects, each representing a key/value pair in the Table.

Examples

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 );

        Table t = (Table)engine.evaluate( "table([1=100,2=200,3=300,4=400]):" );

        for (Algebraic e : t.keySet()) {

            System.out.println( "Key: " + e );

        }

    }

}

Executing this code produces the following output.

true

true

false

false

true

true

false

false

See Also

ExternalCalling/Java/MapleException

OpenMaple

OpenMaple/Java/Algebraic

OpenMaple/Java/API

OpenMaple/Java/Table

OpenMaple/Java/Table/assign

OpenMaple/Java/Table/clear

OpenMaple/Java/Table/remove

OpenMaple/Java/Table/select

OpenMaple/Java/Table/values