ListEnumerator.moveNext Method

Determines whether the enumerator denotes a valid list element.

Syntax

public boolean moveNext()

Run On

Called

Return Value

Type: boolean
true if the current position in the list holds a valid element; otherwise, false.

Remarks

List enumerators start before the first element in the list. You must call the moveNext method to make it point to the first element in the list.

Examples

The following example uses the moveNext method to check whether there is another element in the list and then sets the dimensionTopic variable to the value of the current list element.

public DimensionTopic firstDimensionTopic() 
{ 
    DimensionTopic  dimensionTopic; 
    ListEnumerator  enumerator; 
  
    enumerator = this.getTopicsEnumerator(); 
  
    if (enumerator.moveNext()) 
    { 
        dimensionTopic = enumerator.current(); 
    } 
  
    return dimensionTopic; 
}

See Also

Reference

ListEnumerator Class