package sk.teamsoft.observablecollection;

/**
 * Interface intended for non-trivial comparison for DiffUtils
 * If object does not implement this interface, it will be compared by default with
 * {@link Object#equals(Object)} and {@link Object#hashCode()} for reference and content
 * comparison respectively
 * @author Dusan Bartos
 */
@SuppressWarnings("WeakerAccess")
public interface DiffResolver<T> {

    /**
     * Method used to determine item equality
     * Determines it viewHolder should be replaced
     * @param other new item to compare with the old one
     * @return true if objects are considered equal
     */
    boolean equalsItem(T other);

    /**
     * Method used to determine contents equality
     * Determines if viewHolder should be updated
     * This is only checked if {@link #equalsItem(Object)} returns true
     * @param other new item to compare with the old one
     * @return true if contents of these objects are equal
     */
    boolean areContentsTheSame(T other);
}

@@ -36,16 +36,60 @@
 ction;%0A%0A
+import android.support.annotation.NonNull;%0A%0A
 /**%0A * I
@@ -690,16 +690,25 @@
 alsItem(
+@NonNull 
 T other)
@@ -1045,16 +1045,25 @@
 TheSame(
+@NonNull 
 T other)

correct override non-nullable type for kotlin