package com.annimon.stream;

import java.util.Comparator;

/**
 * Common operations with Object.
 * @author aNNiMON
 */
public final class Objects {
    
    public static boolean equals(Object a, Object b) {
        return (a == b) || (a != null && a.equals(b));
    }
    
    public static int hashCode(Object o) {
        return o != null ? o.hashCode() : 0;
    }
    
    public static String toString(Object o, String nullDefault) {
        return (o != null) ? o.toString() : nullDefault;
    }
    
    public static <T> int compare(T a, T b, Comparator<? super T> c) {
        return (a == b) ? 0 : c.compare(a, b);
    }
    
    public static <T> T requireNonNull(T obj) {
        if (obj == null)
            throw new NullPointerException();
        return obj;
    }
    
    public static <T> T requireNonNull(T obj, String message) {
        if (obj == null)
            throw new NullPointerException(message);
        return obj;
    }
}

@@ -377,32 +377,285 @@
 ;%0D%0A    %7D%0D%0A    %0D%0A
+    public static int hash(Object... values) %7B%0D%0A        if (values == null) return 0;%0D%0A        %0D%0A        int result = 1;%0D%0A        for (Object element : values)%0D%0A            result = 31 * result + hashCode(element);%0D%0A        return result;%0D%0A    %7D%0D%0A    %0D%0A
     public stati

Add hash array computation to Objects