Class ThrowableCollector


  • public class ThrowableCollector
    extends Object
    Class to collect a list of Throwable
    • Constructor Detail

      • ThrowableCollector

        public ThrowableCollector()
        Constructor
    • Method Detail

      • add

        public void add​(Throwable throwable)
        Method to collect a Throwable
        Parameters:
        throwable -
      • addAll

        public void addAll​(ThrowableCollector throwableCollector)
        Method to collect Throwable from another ThrowableCollector
        Parameters:
        throwableCollector -
      • size

        public int size()
        Method to get the number of Throwable collected
        Returns:
      • isEmpty

        public boolean isEmpty()
        Method to return whether the collector has any Throwable
        Returns:
      • getFirst

        public Optional<Throwable> getFirst()
        Method to get the first Throwable or null
        Returns:
      • getList

        public List<Throwable> getList()
        Method to get the list of Throwable
        Returns: