Example usage for java.util Arrays hashCode

List of usage examples for java.util Arrays hashCode

Introduction

In this page you can find the example usage for java.util Arrays hashCode.

Prototype

public static int hashCode(Object a[]) 

Source Link

Document

Returns a hash code based on the contents of the specified array.

Usage

From source file:com.buaa.cfs.nfs3.FileHandle.java

@Override
public int hashCode() {
    return Arrays.hashCode(handle);
}

From source file:com.oak_yoga_studio.domain.User.java

@Override
public int hashCode() {
    int hash = 3;
    hash = 71 * hash + (this.firstName != null ? this.firstName.hashCode() : 0);
    hash = 71 * hash + (this.lastName != null ? this.lastName.hashCode() : 0);
    hash = 71 * hash + (this.dateOfBirth != null ? this.dateOfBirth.hashCode() : 0);
    hash = 71 * hash + (this.email != null ? this.email.hashCode() : 0);
    hash = 71 * hash + Arrays.hashCode(this.profilePicture);
    return hash;/*from ww w . j a  va 2 s  . c  om*/
}

From source file:com.milaboratory.core.alignment.AbstractAlignmentScoring.java

@Override
public int hashCode() {
    return Arrays.hashCode(subsMatrix) + 31 * getAlphabet().hashCode();
}

From source file:com.softenido.cafedark.image.hash.ImageHashBuilder.java

public Hash buildHash(BufferedImage image) {
    count.incrementAndGet();//w ww  .j av  a  2  s.c o  m
    image = scale.filter(image);

    int w = image.getWidth();
    int h = image.getHeight();

    //        JFrame frame = new JFrame();
    //        frame.setTitle("["+w+"x"+h+"]"+" ");
    //        frame.add(new JLabel(new ImageIcon(image)));
    //        frame.setVisible(true);
    //        frame.pack();

    int[] pixels = null;
    pixels = image.getRGB(0, 0, w, h, pixels, 0, w);
    if (colorThreshold > 0 && gray) {
        byte[] hash = new byte[pixels.length];
        for (int i = 0; i < hash.length; i++) {
            hash[i] = (byte) (pixels[i] & 0xff);
        }
        int hc = (w * h) + (w - h);
        //            System.out.println(Arrays.toString(hash));
        return new StickyImageHash(w, h, hc, hash, colorThreshold, countThresold);
    }
    if (colorThreshold > 0) {
        byte[] hash = ArrayUtils.getByteArray(pixels);
        int hc = (w * h) + (w - h);
        System.out.println(Arrays.toString(hash));
        return new StickyImageHash(w, h, hc, hash, colorThreshold, countThresold);
    }
    byte[] hash = buildDigest(pixels);
    int hc = (w * h) + (w - h) + Arrays.hashCode(hash);
    System.out.println(Arrays.toString(hash));
    return new ImageHash(w, h, hc, hash);
}

From source file:edu.hm.cs.fs.scriptinat0r7.model.ScriptDocument.java

@Override
public final int hashCode() {
    return Objects.hash(hashvalue, Arrays.hashCode(file), sortnumber, reviewState, password, filename, note);
}

From source file:ubicrypt.core.Utils.java

public static int deviceId() {
    try {/* ww w. ja v  a  2  s . co m*/
        final Enumeration<NetworkInterface> it = NetworkInterface.getNetworkInterfaces();
        int ret = 0;
        while (it.hasMoreElements() && ret == 0) {
            ret = Arrays.hashCode(it.nextElement().getHardwareAddress());
        }
        return ret;
    } catch (final SocketException e) {
        Throwables.propagate(e);
    }
    return -1;
}

From source file:org.protempa.backend.dsb.relationaldb.SQLGenLocalUniqueId.java

@Override
public int hashCode() {
    if (this.hashCode == 0) {
        int hash = 3;
        hash = 53 * hash + this.entitySpecName.hashCode();
        hash = 53 * hash + Arrays.hashCode(this.dbIds);
        this.hashCode = hash;
    }//from  w  ww.  jav  a 2 s  .co  m
    return this.hashCode;
}

From source file:au.org.ala.biocache.dto.SpatialSearchRequestParams.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + ((gk == null) ? 0 : gk.hashCode());
    result = prime * result + Arrays.hashCode(gkFq);
    result = prime * result + ((lat == null) ? 0 : lat.hashCode());
    result = prime * result + ((lon == null) ? 0 : lon.hashCode());
    result = prime * result + ((radius == null) ? 0 : radius.hashCode());
    result = prime * result + ((wkt == null) ? 0 : wkt.hashCode());
    return result;
}

From source file:com.capitati.omtc.core.negotiation.SemanticVersion.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + Arrays.hashCode(build);
    result = prime * result + major;/*w w  w .j  a va  2s  .c  om*/
    result = prime * result + minor;
    result = prime * result + patch;
    result = prime * result + Arrays.hashCode(preRelease);
    return result;
}

From source file:org.whispersystems.textsecuregcm.util.Util.java

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