public abstract class MultiConvertingFragileLoopItemHandler<T,S> extends java.lang.Object implements FragileLoopItemHandler<S,TypeConverterException>
| Modifier and Type | Field and Description |
|---|---|
protected FragileTypeConverter<? extends java.lang.Iterable<T>,? super S> |
typeConverter |
| Modifier | Constructor and Description |
|---|---|
protected |
MultiConvertingFragileLoopItemHandler(FragileTypeConverter<? extends java.lang.Iterable<T>,? super S> typeConverter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterFinish()
Called after the loop has finished.
|
void |
beforeStart()
Called before the loop is started.
|
boolean |
handle(S item)
Handle an item.
|
protected abstract boolean |
handleConverted(T converted,
S incoming)
Handle the converted item.
|
protected final FragileTypeConverter<? extends java.lang.Iterable<T>,? super S> typeConverter
protected MultiConvertingFragileLoopItemHandler(@NotNull FragileTypeConverter<? extends java.lang.Iterable<T>,? super S> typeConverter)
typeConverter - type converterprotected abstract boolean handleConverted(T converted, S incoming) throws java.lang.Exception
converted - converted itemincoming - incoming itemtrue go on with loopfalse break loopjava.lang.Exception - any exception the fragile converter introducespublic boolean handle(S item) throws TypeConverterException
handle in interface FragileLoopItemHandler<S,TypeConverterException>item - item to handletrue go on with loopfalse break loopTypeConverterException - on type conversion errorspublic void beforeStart()
beforeStart in interface LoopHandlerpublic void afterFinish()
afterFinish in interface LoopHandler