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

Online Help

All Products    Maple    MapleSim


Table

OpenMaple representation of a Table

 

Description

Method Summary

Description

• 

The com.maplesoft.openmaple.Table class represents a Maple table.

• 

Table publicly inherits from Indexable; therefore, it provides all the member functions from the Indexable and Algebraic classes in addition to those listed here.

• 

The Table class implements the java.util.Map interface with Algebraic key and value types.

• 

To create a Table call newTable.  The new Table will be empty.

Method Summary

• 

The following methods are defined on Table objects:

void assign( Algebraic index, Algebraic val ) throws MapleException

• 

assign places val into the Table with key index.

Algebraic select( Algebraic index ) throws MapleException

• 

select returns the value associated with key index.

boolean has( Algebraic index ) throws MapleException

• 

has returns true if the Table contains data associated with key index.

List indexEntryPairs( ) throws MapleException

• 

indexEntryPairs returns a List of Relation objects corresponding to key/value pairs in the Table.

void unassign( Algebraic index ) throws MapleException

• 

unassign removes the data associated with index from the Table.

• 

The Table class also includes the following methods which implement the java.util.Map interface:

void clear( )

• 

clear removes all data from the Table.

boolean containsKey( Object key )

• 

containsKey returns true if key is an Algebraic and the Table contains a key identical to key.

  

This is similar to has except that it accepts an arbitrary Object and does not throw a MapleException.

boolean containsValue( Object value )

• 

containsValue returns true if value is an Algebraic and the Table contains a value identical to value.

  

This is similar to member except that it accepts an arbitrary Object and does not throw a MapleException.

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

• 

entrySet returns a java.util.Set view of the key/value pairs in the Table.

Algebraic get( Object key )

• 

get returns the value associated with key key.

  

This is similar to select except that it accepts an arbitrary Object and does not throw a MapleException.

java.util.Set<Algebraic> keySet( )

• 

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

Algebraic put( Algebraic key, Algebraic value )

• 

put assigns the value value into in the Table with key key.

  

This is similar to assign except that it does not throw a MapleException.

Algebraic putAll( Map<? extends Algebraic, ? extends Algebraic> m )

• 

putAll puts each of the mappings from the specified map into the Table.

void remove( Algebraic index )

• 

remove removes the data associated with index from the Table.

  

This is identical to unassign except that it does not throw a MapleException.

java.util.Collection<Algebraic> values( )

• 

values returns a java.util.Collection view of the values contained in the Table.

See Also

OpenMaple

OpenMaple/Java/Algebraic

OpenMaple/Java/API

OpenMaple/Java/Examples

OpenMaple/Java/Indexable

OpenMaple/Java/List

OpenMaple/Java/RTable

OpenMaple/Java/Set

table