Package org.verifyica.api
Class Cleanup
java.lang.Object
org.verifyica.api.Cleanup
Deprecated.
Class to implement Cleanup
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated.Interface to implement Action -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Throws the first Throwable if not emptyclear()Deprecated.Removes any collected ThrowablesDeprecated.Close a Closable if not nullDeprecated.Close an array of CloseablesgetFirst()Deprecated.Get the first ThrowableDeprecated.Get the List of ThrowablesbooleanisEmpty()Deprecated.Returns if the Cleanup has collected any ThrowablesbooleanDeprecated.Returns if the Cleanup has not collected any Throwablesperform(Cleanup.Action action) Deprecated.Performs a Cleanup.Action, collecting the Throwable if thrownperform(Cleanup.Action... actions) Deprecated.Performs an array of Cleanup.Actions, collecting the Throwables if thrown
-
Constructor Details
-
Cleanup
public Cleanup()Deprecated.Constructor
-
-
Method Details
-
perform
Deprecated.Performs a Cleanup.Action, collecting the Throwable if thrown- Parameters:
action- executable- Returns:
- this
-
perform
Deprecated.Performs an array of Cleanup.Actions, collecting the Throwables if thrown- Parameters:
actions- executables- Returns:
- this
-
close
Deprecated.Close a Closable if not null- Parameters:
closeable- closable- Returns:
- this
-
close
Deprecated.Close an array of Closeables- Parameters:
closeables- closeables- Returns:
- this
-
isEmpty
public boolean isEmpty()Deprecated.Returns if the Cleanup has collected any Throwables- Returns:
- true if no Throwables have been collected, else false
-
isNotEmpty
public boolean isNotEmpty()Deprecated.Returns if the Cleanup has not collected any Throwables- Returns:
- true if no Throwables have been collected, else false
-
getThrowables
Deprecated.Get the List of Throwables- Returns:
- a List of Throwables
-
getFirst
Deprecated.Get the first Throwable- Returns:
- if a Throwable was thrown, an Optional that contains the first Throwable, else Optional.empty()
-
assertEmpty
Deprecated.Throws the first Throwable if not empty- Returns:
- this
- Throws:
Throwable- Throwable
-
clear
Deprecated.Removes any collected Throwables- Returns:
- this
-