This is the representation of a single record of a GAMSSymbol
instance.
More...
Public Member Functions | |
String[] | getKeys () |
Retrieve keys of this GAMSSymbolRecord instance. | |
String | getKey (int index) |
Retrieve key of GAMSSymbolRecord on position index. | |
boolean | equals (Object obj) |
Indicates whether some other object is "equal to" this one. | |
int | hashCode () |
Returns a hash code value for the object. | |
boolean | isDisposed () |
Inquire if this record has already been disposed. | |
void | dispose () |
Release external resources hold by non-java library. | |
boolean | moveNext () |
Iterate to next GAMSSymbolRecord of GAMSSymbol using the current criterion. | |
boolean | movePrevious () |
Iterate to previous GAMSSymbolRecord of GAMSSymbol using the current criterion. | |
Protected Member Functions | |
GAMSSymbolRecord (GAMSSymbol<?> symbol, long ptr) | |
Create a new GAMSSymbolRecord instance. | |
GAMSSymbolRecord (GAMSSymbolRecord record) | |
Create a new GAMSSymbolRecord instance. | |
void | finalize () throws Throwable |
Release resources used by non-java library. | |
Detailed Description
This is the representation of a single record of a GAMSSymbol
instance.
Derived classes are GAMSEquationRecord
, GAMSParameterRecord
, GAMSSetRecord
and GAMSVariableRecord
.
There are a number of methods to obtain several GAMSSymbolRecord instances with the same underlying data. The behavior of GAMSSymbolRecord is unspecified if the underlying data has been deleted in any other way.
- See also
- GAMSSymbol.findRecord(String...)
- GAMSSymbol.mergeRecord(String...)
- GAMSSymbol.addRecord(String...)
- GAMSSymbol.deleteRecord(String...)
- GAMSSymbol.getFirstRecord()
- GAMSSymbol.getFirstRecord(String...)
- GAMSSymbol.getLastRecord()
- GAMSSymbol.getLastRecord(String...)
- GAMSSymbolIterator.next()
- GAMSSymbolIterator.remove()
Constructor & Destructor Documentation
◆ GAMSSymbolRecord() [1/2]
|
protected |
Create a new GAMSSymbolRecord instance.
The constructor assumes that
the GAMSDatabase instance is not disposed (resources are still available).
- Parameters
-
symbol GAMSSymbol to initialize this instance from ptr symbol pointer to initialize this instance from
- Exceptions
-
GAMSException If the GAMSDatabase instance of this symbol has already been disposed, therefore resources are no longer available.
◆ GAMSSymbolRecord() [2/2]
|
protected |
Create a new GAMSSymbolRecord instance.
The constructor assumes that
the GAMSDatabase instance is not disposed (resources are still available).
- Parameters
-
record GAMSSymbolRecord to initialize this instance from
- Exceptions
-
GAMSException If the GAMSDatabase instance of this symbol has already been disposed, therefore resources are no longer available.
Member Function Documentation
◆ dispose()
void com.gams.api.GAMSSymbolRecord.dispose | ( | ) |
Release external resources hold by non-java library.
A subsequent call on the object after disposed potentially causes an unexpected error or exception.
Call this method either when the object is no longer needed and/or when resource management is a critical issue in the application.
◆ equals()
boolean com.gams.api.GAMSSymbolRecord.equals | ( | Object | obj | ) |
Indicates whether some other object is "equal to" this one.
The two GAMSSymbols are equivalent if and only if they are records of the same symbol and same internal reference.
- Parameters
-
obj the reference object with which to compare
- Returns
- true if this object is the same as the obj argument; false otherwise.
◆ finalize()
|
protected |
Release resources used by non-java library.
◆ getKey()
String com.gams.api.GAMSSymbolRecord.getKey | ( | int | index | ) |
Retrieve key of GAMSSymbolRecord on position index.
- Parameters
-
index Index 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
-
GAMSException If a record could not be retrieved, or the GAMSDatabase instance of this symbol has already been disposed therefore resources are no longer available.
◆ hashCode()
int com.gams.api.GAMSSymbolRecord.hashCode | ( | ) |
Returns a hash code value for the object.
- Returns
- a hash code value for this object.
◆ isDisposed()
boolean com.gams.api.GAMSSymbolRecord.isDisposed | ( | ) |
Inquire if this record has already been disposed.
- Returns
- true if disposed, false otherwise
◆ 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
-
GAMSException if 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
-
GAMSException if the GAMSDatabase instance has already been disposed.
- See also
- GAMSSymbol<T extends GAMSSymbolRecord>.getFirstRecord(String...)
- GAMSSymbol<T extends GAMSSymbolRecord>.getLastRecord(String...)