public class Loop extends Object
Constructor and Description |
---|
Loop() |
Modifier and Type | Method and Description |
---|---|
int |
getIndex()
Returns the current loop index.
|
boolean |
isFirst()
Returns true if the current element is the first of the collection
|
boolean |
isLast()
Returns true if the current element is the last of the collection
|
boolean |
isStopped()
Returns true if forEach loop should be stopped
|
protected void |
setIndex(int index)
Internal method to change current index
|
protected void |
setIsLast()
Internal method to change isLast flag
|
void |
stop()
Call this method to stop a forEach loop
|
public void stop()
public boolean isStopped()
public boolean isLast()
public boolean isFirst()
public int getIndex()
protected void setIsLast()
protected void setIndex(int index)
index
- new indexCopyright © 2019–2021 HCL. All rights reserved.