Java Object Hash hashCode(Object... objects)

Here you can find the source of hashCode(Object... objects)

Description

Returns the hash code value for the given objects , or 0 if it's null .

License

Open Source License

Declaration

public static int hashCode(Object... objects) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Arrays;

public class Main {
    /**//from   w ww.  ja  va 2s  .  com
     * Returns the hash code value for the given {@code objects},
     * or 0 if it's {@code null}.
     */
    public static int hashCode(Object... objects) {
        if (objects == null) {
            return 0;

        } else if (objects.length == 1) {
            Object object = objects[0];
            return object == null ? 0 : object.hashCode();

        } else {
            return Arrays.hashCode(objects);
        }
    }
}

Related

  1. hashCode(Object o)
  2. hashCode(Object obj)
  3. hashCode(Object obj)
  4. hashCode(Object object)
  5. hashCode(Object... args)
  6. makeHashCode(Object... objects)
  7. safeHashCode(Object o)
  8. safeHashCode(Object... objects)