TableOpenMaple representation of a Table
DescriptionMethod Summary
<Text-field style="Heading 2" layout="Heading 2" bookmark="info">Description</Text-field>
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.
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk0">Method Summary</Text-field>
The following methods are defined on Table objects:
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk1">void assign( Algebraic index, Algebraic val ) throws MapleException</Text-field>
assign places val into the Table with key index.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk2">Algebraic select( Algebraic index ) throws MapleException</Text-field>
select returns the value associated with key index.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk3">boolean has( Algebraic index ) throws MapleException</Text-field>
has returns true if the Table contains data associated with key index.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk4">List indexEntryPairs( ) throws MapleException</Text-field>
indexEntryPairs returns a List of Relation objects corresponding to key/value pairs in the Table.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk5">void unassign( Algebraic index ) throws MapleException</Text-field>
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:
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk6">void clear( )</Text-field>
clear removes all data from the Table.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk7">boolean containsKey( Object key )</Text-field>
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.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk8">boolean containsValue( Object value )</Text-field>
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.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk9">java.util.Set<Map.Entry<Algebraic,Algebraic>> entrySet( )</Text-field>
entrySet returns a java.util.Set view of the key/value pairs in the Table.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk10">Algebraic get( Object key )</Text-field>
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.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk11">java.util.Set<Algebraic> keySet( )</Text-field>
keySet returns a java.util.Set view of the keys in the Table.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk12">Algebraic put( Algebraic key, Algebraic value )</Text-field>
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.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk13">Algebraic putAll( Map<? extends Algebraic, ? extends Algebraic> m )</Text-field>
putAll puts each of the mappings from the specified map into the Table.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk14">void remove( Algebraic index )</Text-field>
remove removes the data associated with index from the Table.
This is identical to unassign except that it does not throw a MapleException.
<Text-field style="Heading 3" layout="Heading 3" bookmark="bkmrk15">java.util.Collection<Algebraic> values( )</Text-field>
values returns a java.util.Collection view of the values contained in the Table.
See AlsoOpenMapleOpenMaple/Java/AlgebraicOpenMaple/Java/APIOpenMaple/Java/ExamplesOpenMaple/Java/ListOpenMaple/Java/Settable