Class DistinctExceptionsCollection


  • public class DistinctExceptionsCollection
    extends java.lang.Object
    The collection that behaves like a MultiSet with two Exceptions beeing treaded equal if they have the same class, and their cause exceptions are equal in the same sense. The implementation has weak performance, but the expected size of data is very small. If that would ever change, consider reimplementing it.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int add​(java.lang.Throwable t)
      Adds exception to the list of exceptions and returns the integer denoting how many similar exceptions are already in this collection.
      int get​(java.lang.Throwable t)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DistinctExceptionsCollection

        public DistinctExceptionsCollection()
    • Method Detail

      • add

        public int add​(java.lang.Throwable t)
        Adds exception to the list of exceptions and returns the integer denoting how many similar exceptions are already in this collection.
        Returns:
        the number of times this exception has been add to the collection (incl. this operation)
      • get

        public int get​(java.lang.Throwable t)
        Returns:
        the count for the given exception