com.gams.api.GAMSSymbolIterator< T extends GAMSSymbolRecord > Class Template Reference
An iterator of a GAMSymbol over a collection of GAMSSymbolRecord. More...
Inherits Iterator< T >.
Public Member Functions | |
boolean | hasNext () |
Checks if the iteration has more elements. | |
T | next () |
Returns the next element T in the iteration. | |
void | remove () |
The purpose of this method is to remove all records of the last GAMSSymbol element returned by the iterator. | |
Detailed Description
An iterator of a GAMSymbol over a collection of GAMSSymbolRecord.
The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress.
- Parameters
-
<T> an element of a GAMSymbolRecord
- Since
- 24.1.3
- See also
- GAMSDatabase
- GAMSSymbol<T extends GAMSSymbolRecord>
- GAMSSymbol<T extends GAMSSymbolRecord>.iterator()
Member Function Documentation
◆ hasNext()
boolean com.gams.api.GAMSSymbolIterator< T extends GAMSSymbolRecord >.hasNext | ( | ) |
Checks if the iteration has more elements.
- Returns
- true if the iterator has more elements, false otherwise.
- Exceptions
-
GAMSException If the GAMSDatabase instance of this symbol has already been disposed.
◆ next()
T com.gams.api.GAMSSymbolIterator< T extends GAMSSymbolRecord >.next | ( | ) |
Returns the next element T in the iteration.
- Returns
- the next element T in the iteration.
- Exceptions
-
GAMSException If the next element is not found or the GAMSDatabase instance of this symbol has already been disposed.
◆ remove()
void com.gams.api.GAMSSymbolIterator< T extends GAMSSymbolRecord >.remove | ( | ) |
The purpose of this method is to remove all records of the last GAMSSymbol element returned by the iterator.
This method can be called only once per call to next(). The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.
- Exceptions
-
GAMSException if the last element could not be removed or the GAMSDatabase instance of this symbol has already been disposed.