containsAll - 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

Set.containsAll

test for membership in the Set

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

boolean containsAll( Collection<?> o )

Parameters

o

-

Collection of objects

Description

• 

The containsAll function returns true if every member of the collection o is equal to some element of the Set and false otherwise.

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

        Set s = (Set)engine.evaluate( "{2,5,sin(x),1+2*x+x^2,7.5};" );

     java.util.ArrayList arr = new ArrayList<Algebraic>();

     arr.add( engine.newNumeric( 2 ) );

     arr.add( engine.newNumeric( 7 ) );

        System.out.println( "Is the whole collection in the set: " + s.containsAll( arr ) );

    }

}

Executing this code produces the following output:

Is the whole collection in the set: false

See Also

ExternalCalling/Java/MapleException

OpenMaple

OpenMaple/Java/Algebraic

OpenMaple/Java/API

OpenMaple/Java/Set

OpenMaple/Java/Set/iterator

OpenMaple/Java/Set/select

OpenMaple/Java/Set/toArray

 


Download Help Document