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. More...
 
next ()
 Returns the next element T in the iteration. More...
 
void remove ()
 Removes from the underlying collection the last element returned by the iterator. More...
 
void finalize () throws Throwable
 Release resources used by non-java library, called by Garbage collector. More...
 

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

◆ finalize()

void com.gams.api.GAMSSymbolIterator< T extends GAMSSymbolRecord >.finalize ( ) throws Throwable

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

It is not advisable to call this method. Advanced use only.

Exceptions
exceptionor error raised by calling finalize().

◆ 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
GAMSExceptionIf the GAMSDatabase instance of this symbol has already been disposed.

◆ next()

Returns the next element T in the iteration.

Returns
the next element T in the iteration.
Exceptions
GAMSExceptionIf 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 ( )

Removes from the underlying collection the last 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
GAMSExceptionif the last element could not be removed or the GAMSDatabase instance of this symbol has already been disposed.