Android Hash Code Calculate getHashCode(final Object... pObjects)

Here you can find the source of getHashCode(final Object... pObjects)

Description

get Hash Code

Declaration

public static int getHashCode(final Object... pObjects) 

Method Source Code

//package com.java2s;

public class Main {
    public static int getHashCode(final byte... pBytes) {
        final int prime = 31;
        int result = 1;

        for (int i = 0; i < pBytes.length; i++) {
            result = prime * result + pBytes[i];
        }/*  w  w  w .  j av  a  2 s. c o m*/

        return result;
    }

    public static int getHashCode(final Object... pObjects) {
        final int prime = 31;
        int result = 1;

        for (int i = 0; i < pObjects.length; i++) {
            final Object object = pObjects[i];
            result = prime * result
                    + ((object == null) ? 0 : object.hashCode());
        }

        return result;
    }
}

Related

  1. hashLocationMessage(String phone, double latitude, double longitude, long time)
  2. hashPointOfInterestMessage(String phone, double latitude, double longitude, String title, String description)
  3. computeWeakHash(String string)
  4. computeWeakHash(String string)
  5. getHash(String text)
  6. getHashCode(final byte... pBytes)
  7. getHashStringFromId(String id)
  8. getHexDigit(String s, int i)
  9. createHash(String title, String URL, String content)