public DataProviderEvent(final LocalizableMessage reason,final Set<Type> types){
  Reject.ifNull(reason,types);
  Reject.ifTrue(types.isEmpty());
  this.reason=reason;
  final EnumSet<Type> tmp=EnumSet.noneOf(Type.class);
  tmp.addAll(types);
  this.types=Collections.unmodifiableSet(tmp);
}

public DataProviderEvent ( final LocalizableMessage reason , final Set < Type > types ) { Reject . ifNull ( reason , types ) ; Reject . ifTrue ( types . isEmpty ( ) ) ; this . reason = reason ; final EnumSet < Type > tmp = EnumSet . noneOf ( Type . class ) ; tmp . addAll ( types ) ; this . types = Collections . unmodifiableSet ( tmp ) ; }
creates a new data provider event .
