public static Optional < MuteEvent > createMuteEvent ( Identification source , Identification target ) { if ( target == null || target . equals ( source ) ) return Optional . empty ( ) ; try { MuteEvent muteRequest = new MuteEvent ( source ) ; muteRequest . addResource ( new SelectorResource ( source , target ) ) ; return Optional . of ( muteRequest ) ; } catch ( IllegalArgumentException e ) { return Optional . empty ( ) ; } }
creates a new MuteEvent