public class FindFirstIndexHandler<T> extends java.lang.Object implements LoopItemHandler<T>
Constructor and Description |
---|
FindFirstIndexHandler(T object)
Constructor.
|
FindFirstIndexHandler(T object,
int startIndex)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
afterFinish()
Called after the loop has finished.
|
void |
beforeStart()
Called before the loop is started.
|
int |
getFoundIndex()
Get the index where the object was found.
|
T |
getFoundItem()
Get the item which was found.
|
T |
getSearchObject()
Get the looked up object.
|
boolean |
handle(T item)
Handle an item.
|
public FindFirstIndexHandler(@Nullable T object)
object
- object to look forpublic boolean handle(T item)
handle
in interface LoopItemHandler<T>
item
- item to handletrue
go on with loopfalse
break looppublic void beforeStart()
beforeStart
in interface LoopHandler
public void afterFinish()
afterFinish
in interface LoopHandler
public int getFoundIndex()
-1
@Nullable public T getFoundItem()
null