com.gams.api.GAMSSymbolRecord Class Referenceabstract

This is the representation of a single record of a GAMSSymbol instance. More...

Inheritance diagram for com.gams.api.GAMSSymbolRecord:
com.gams.api.GAMSEquationRecord com.gams.api.GAMSParameterRecord com.gams.api.GAMSSetRecord com.gams.api.GAMSVariableRecord

Public Member Functions

String [] getKeys ()
 Retrieve keys of this GAMSSymbolRecord instance. More...
 
String getKey (int index)
 Retrieve key of GAMSSymbolRecord on position index. More...
 
boolean moveNext ()
 Iterate to next GAMSSymbolRecord of GAMSSymbol using the current criterion. More...
 
boolean movePrevious ()
 Iterate to previous GAMSSymbolRecord of GAMSSymbol using the current criterion. More...
 

Protected Member Functions

 GAMSSymbolRecord (GAMSSymbol<?> symbol, long ptr)
 Create a new GAMSSymbolRecord instance. More...
 
 GAMSSymbolRecord (GAMSSymbolRecord record)
 Create a new GAMSSymbolRecord instance. More...
 
void finalize () throws Throwable
 Release resources used by non-java library, called by Garbage collector. More...
 

Detailed Description

This is the representation of a single record of a GAMSSymbol instance.

Derived classes are GAMSEquationRecord, GAMSParameterRecord, GAMSSetRecord and GAMSVariableRecord.

See also
GAMSSymbol.addRecord(String...)
GAMSSymbol.deleteRecord(String...)
GAMSSymbol.getFirstRecord()
GAMSSymbol.getFirstRecord(String...)
GAMSSymbol.getLastRecord()
GAMSSymbol.getLastRecord(String...)
GAMSSymbol.findRecord(String...)
GAMSSymbol.mergeRecord(String...)

Constructor & Destructor Documentation

◆ GAMSSymbolRecord() [1/2]

com.gams.api.GAMSSymbolRecord.GAMSSymbolRecord ( GAMSSymbol<?>  symbol,
long  ptr 
)
protected

Create a new GAMSSymbolRecord instance.

The constructor assumes that the GAMSDatabase instance is not disposed (resources are still available).

Parameters
symbolGAMSSymbol to initialize this instance from
ptrsymbol pointer to initialize this instance from
Exceptions
GAMSExceptionIf the GAMSDatabase instance of this symbol has already been disposed, therefore resources are no longer available.

◆ GAMSSymbolRecord() [2/2]

com.gams.api.GAMSSymbolRecord.GAMSSymbolRecord ( GAMSSymbolRecord  record)
protected

Create a new GAMSSymbolRecord instance.

The constructor assumes that the GAMSDatabase instance is not disposed (resources are still available).

Parameters
recordGAMSSymbolRecord to initialize this instance from
Exceptions
GAMSExceptionIf the GAMSDatabase instance of this symbol has already been disposed, therefore resources are no longer available.

Member Function Documentation

◆ finalize()

void com.gams.api.GAMSSymbolRecord.finalize ( ) throws Throwable
protected

Release resources used by non-java library, called by Garbage collector.

Exceptions
exceptionor error raised by calling finalize().

◆ getKey()

String com.gams.api.GAMSSymbolRecord.getKey ( int  index)

Retrieve key of GAMSSymbolRecord on position index.

Parameters
indexIndex position of key to be returned
Returns
Key a position index

◆ getKeys()

String [] com.gams.api.GAMSSymbolRecord.getKeys ( )

Retrieve keys of this GAMSSymbolRecord instance.

Exceptions
GAMSExceptionIf a record could not be retrieved, or the GAMSDatabase instance of this symbol has already been disposed therefore resources are no longer available.

◆ moveNext()

boolean com.gams.api.GAMSSymbolRecord.moveNext ( )

Iterate to next GAMSSymbolRecord of GAMSSymbol using the current criterion.

In case of a specific criterion has been specified, such as retrieving record in GAMSSymbol that meets a slice criteria (GAMSSymbol<T extends GAMSSymbolRecord>.getFirstRecord(String...)}) the method returns the next GAMSSymbolRecord that also meets the criteria. Otherwise the method returns the next sequential GAMSSymbolRecord.

Returns
true if successfully moved to the next record, false otherwise.
Since
24.1.3
Exceptions
GAMSExceptionif the GAMSDatabase instance has already been disposed.
See also
GAMSSymbol<T extends GAMSSymbolRecord>.getFirstRecord(String...)
GAMSSymbol<T extends GAMSSymbolRecord>.getLastRecord(String...)

◆ movePrevious()

boolean com.gams.api.GAMSSymbolRecord.movePrevious ( )

Iterate to previous GAMSSymbolRecord of GAMSSymbol using the current criterion.

In case of a specific criterion has been specified, such as retrieving record in GAMSSymbol that meets a slice criteria (GAMSSymbol<T extends GAMSSymbolRecord>.getLastRecord(String...)), the method returns the previous GAMSSymbolRecord that also meets the criteria. Otherwise the method returns the previous sequential GAMSSymbolRecord.

Returns
true if successfully moved to the previous record, false otherwise.
Since
24.1.3
Exceptions
GAMSExceptionif the GAMSDatabase instance has already been disposed.
See also
GAMSSymbol<T extends GAMSSymbolRecord>.getFirstRecord(String...)
GAMSSymbol<T extends GAMSSymbolRecord>.getLastRecord(String...)