public static class CollectionUtil.ReduceException extends RuntimeException
CollectionUtil.reduce(java.util.Collection<V>, net.sf.kdgcommons.collections.CollectionUtil.IndexValueReduceFunctor<V, R>)
. Contains the wrapped exception,
the value and index that caused the exception, and the results-to-date.
Note: because Java does not allow parameterization of Throwable
subclasses (JLS 8.1.2), the value and results are held as Object
s.
Constructor and Description |
---|
ReduceException(Throwable cause,
int index,
Object value,
Object partialResults) |
Modifier and Type | Method and Description |
---|---|
int |
getIndex()
Returns the position (0-based) in the original collection's iteration where the
wrapped exception was thrown.
|
Object |
getPartialResults()
Returns any partial results.
|
Object |
getValue()
Returns the value that caused the exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public int getIndex()
public Object getValue()
public Object getPartialResults()
pendingResult
value passed to the functor at the time the exception was thrown.