package name.snavrotskiy.ant.listener;

import com.google.common.base.Preconditions;
import org.jetbrains.annotations.NotNull;

import java.net.URL;

/**
 * This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
 * <p>
 * Notification parameters
 */
class NotificationParams {
    /**
     * Tray icon.
     */
    private final URL icon;
    /**
     * Notification title.
     */
    private final String title;
    /**
     * Notification message.
     */
    private final String message;

    /**
     * Default constructor. All parameters have to be non-null
     *
     * @param trayIcon            tray icon
     * @param notificationTitle   notification title
     * @param notificationMessage notification message
     */
    NotificationParams(@NotNull final URL trayIcon, @NotNull final String notificationTitle, @NotNull final String notificationMessage) {
        Preconditions.checkNotNull(trayIcon);
        Preconditions.checkNotNull(notificationTitle);
        Preconditions.checkNotNull(notificationMessage);

        icon = trayIcon;
        title = notificationTitle;
        message = notificationMessage;
    }

    /**
     * Get uri for tray icon.
     *
     * @return uri
     */
    URL getIcon() {
        return icon;
    }

    /**
     * Get notification title.
     *
     * @return title
     */
    String getTitle() {
        return title;
    }

    /**
     * Get notification message.
     *
     * @return message
     */
    String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "NotificationParams{"
                + "icon=" + icon
                + ", title='" + title + '\''
                + ", message='" + message + '\''
                + '}';
    }
}

@@ -37,53 +37,8 @@
 r;%0A%0A
-import com.google.common.base.Preconditions;%0A
 impo
@@ -75,16 +75,16 @@
 otNull;%0A
+
 %0Aimport 
@@ -854,167 +854,8 @@
 ) %7B%0A
-        Preconditions.checkNotNull(trayIcon);%0A        Preconditions.checkNotNull(notificationTitle);%0A        Preconditions.checkNotNull(notificationMessage);%0A%0A
     
@@ -1305,24 +1305,24 @@
 Message() %7B%0A
+
         retu
@@ -1342,246 +1342,7 @@
    %7D
-%0A%0A    @Override%0A    public String toString() %7B%0A        return %22NotificationParams%7B%22%0A                + %22icon=%22 + icon%0A                + %22, title='%22 + title + '%5C''%0A                + %22, message='%22 + message + '%5C''%0A                + '%7D';%0A    %7D
 %0A%7D%0A

Remove null checks for notification params