Java Object Hash hash(Object o)

Here you can find the source of hash(Object o)

Description

hash

License

Open Source License

Declaration

public static int hash(Object o) 

Method Source Code

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

import java.util.*;

public class Main {
    public static int hash(Object o) {
        if (o == null)
            return 0;
        return o.hashCode();

    }/*from  ww w .j a  v a2 s. c  o m*/

    public static int hash(Object... values) {
        return Arrays.hashCode(values);
    }

    public static int hashCode(Object o) {
        return o != null ? o.hashCode() : 0;
    }
}

Related

  1. combineHashesOrdered(Object... objs)
  2. deepHashCode(final Object object)
  3. deepHashCode(Object o)
  4. getIdentityAsHex(Object object)
  5. hash(Object... objects)
  6. hash(Object... values)
  7. hashCode(final Object o)
  8. hashCode(final Object... objects)