public List < Notification > getByTarget ( Object target ) { List < Notification > found = new ArrayList < Notification > ( ) ; for ( Notification n : NotificationManager . notifications ) { for ( Object t : ( ( InteractionNotification ) n ) . getTarget ( ) ) { if ( t . equals ( target ) ) { logger . fine ( "...found a match for getByTarget query. With target: " + target ) ; found . add ( n ) ; } } } if ( found . size ( ) > 0 ) return found ; return null ; }
Search for notifications of interaction type that match the given target object .