package com.novoda.downloadmanager;

import android.app.Notification;
import android.support.v4.app.NotificationCompat;

public interface NotificationCustomizer<T> {

    NotificationDisplayState notificationDisplayState(T payload);

    Notification customNotificationFrom(NotificationCompat.Builder builder, T payload);

    enum NotificationDisplayState {
        SINGLE_PERSISTENT_NOTIFICATION,
        STACK_NOTIFICATION_NOT_DISMISSIBLE,
        STACK_NOTIFICATION_DISMISSIBLE,
        HIDDEN_NOTIFICATION
    }
}

package com.novoda.downloadmanager;

import android.app.Notification;
import android.support.v4.app.NotificationCompat;

public interface NotificationCustomizer<T> {

    NotificationDisplayState notificationDisplayState(T payload);

    /**
     * Create a custom {@link Notification} from the given {@link NotificationCompat.Builder} and payload.
     *
     * @param builder the base {@link NotificationCompat.Builder} to build the {@link Notification} from.
     * @param payload the information to add to the {@link Notification}.
     * @return the custom {@link Notification} to display.
     */
    Notification customNotificationFrom(NotificationCompat.Builder builder, T payload);

    enum NotificationDisplayState {
        SINGLE_PERSISTENT_NOTIFICATION,
        STACK_NOTIFICATION_NOT_DISMISSIBLE,
        STACK_NOTIFICATION_DISMISSIBLE,
        HIDDEN_NOTIFICATION
    }
}

Add javadoc to the NotificationCustomizer.