Java Hash Code Calculate hashCode(byte a[], int offset, int length)

Here you can find the source of hashCode(byte a[], int offset, int length)

Description

hash Code

License

Open Source License

Declaration

private static int hashCode(byte a[], int offset, int length) 

Method Source Code

//package com.java2s;

public class Main {
    private static int hashCode(byte a[], int offset, int length) {
        if (a == null)
            return 0;
        int result = 1;
        for (int i = offset; i < offset + length; i++) {
            result = 31 * result + a[i];
        }//  w  w  w . j  a v a  2  s  .  c o  m
        return result;
    }
}

Related

  1. hashCode(boolean b)
  2. hashCode(boolean bool)
  3. hashCode(boolean bool)
  4. hashCode(boolean value)
  5. hashCode(byte a[])
  6. hashCode(byte[] array)
  7. hashCode(byte[] array, int size)
  8. hashCode(byte[] bytes, int offset, int length)
  9. hashCode(byte[] bytes, int size)