Package com.helger.phase4.error
Class AS4ErrorList
java.lang.Object
com.helger.phase4.error.AS4ErrorList
Specific list of
AS4Error objects- Since:
- 4.2.0
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull AS4ErrorListadd(@NonNull Ebms3Error aError) Add an EBMS Error to the list.@NonNull AS4ErrorListAdd an error to the list.@NonNull AS4ErrorListaddAll(@NonNull AS4ErrorList aOther) Add another error list to this listvoidIterate over each contained error with the provided consumer.<T> @NonNull com.helger.collection.commons.ICommonsList<T> getAllMapped(@NonNull Function<? super AS4Error, T> aFunc) Get a mapped list of all contained errors.booleanisEmpty()booleaniterator()Get an iterator over all contained errors.intsize()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
spliterator
-
Constructor Details
-
AS4ErrorList
public AS4ErrorList()
-
-
Method Details
-
add
Add an EBMS Error to the list. It is internally wrapped into anAS4Error. No special HTTP Status code can be provided with this method.- Parameters:
aError- The error to be added. May not benull.- Returns:
- this for chaining
-
add
Add an error to the list.- Parameters:
aError- The error to be added. May not benull.- Returns:
- this for chaining
-
addAll
Add another error list to this list- Parameters:
aOther- the error list to be added. May not benull.- Returns:
- this for chaining
-
getAllMapped
@ReturnsMutableCopy public <T> @NonNull com.helger.collection.commons.ICommonsList<T> getAllMapped(@NonNull Function<? super AS4Error, T> aFunc) Get a mapped list of all contained errors.- Type Parameters:
T- The destination type.- Parameters:
aFunc- The function to be invoked for each error in the list. May not benull.- Returns:
- A non-
nullbut maybe empty list of mapped elements.
-
forEach
Iterate over each contained error with the provided consumer. -
isEmpty
public boolean isEmpty()- Returns:
trueif the list is empty,falseif not.- See Also:
-
isNotEmpty
public boolean isNotEmpty()- Returns:
trueif the list is not empty,falseif it is.- See Also:
-
size
@Nonnegative public int size()- Returns:
- The number of errors contained. Must be ≥ 0.
-
iterator
Get an iterator over all contained errors. -
toString
-