public < T extends Cause > T findCause ( Class < T > type ) { for ( Cause c : causeBag . keySet ( ) ) if ( type . isInstance ( c ) ) return type . cast ( c ) ; return null ; }
Finds the cause of the specific type .