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:org.p2pvpn.network.PeerID.java

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

From source file:org.rifidi.emulator.reader.sharedrc.tagmemory.RifidiTagMap.java

/**
 * Remove a tag from the hashmap// w  w w . j a  va 2 s.  c o  m
 * 
 * @param tagID
 *            The ID of the tag to remove
 * @return
 */
public boolean removeTag(byte[] tagID) {
    if (!tags.containsKey(Arrays.hashCode(tagID))) {

        logger.debug("Tag that is trying to be removed" + " does not exist in the array, whose size is "
                + tags.size());

        logger.debug("Tag that we are trying to remove: " + ByteAndHexConvertingUtility.toHexString(tagID));
    }

    if (tags.remove(Arrays.hashCode(tagID)) == null) {
        return false;
    } else {
        return true;
    }
}

From source file:com.linkedin.databus2.schemas.SchemaId.java

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

From source file:com.thoughtworks.studios.journey.jql.Tuple.java

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

From source file:org.opendaylight.controller.sal.core.MacAddress.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + Arrays.hashCode(controllerMacAddress);
    result = prime * result + Arrays.hashCode(nodeMacAddress);
    return result;
}

From source file:com.jivesoftware.os.amza.api.wal.KeyedTimestampId.java

@Override
public int hashCode() {
    int hash = 7;
    hash = 17 * hash + (prefix != null ? Arrays.hashCode(prefix) : 0);
    hash = 17 * hash + (key != null ? Arrays.hashCode(key) : 0);
    hash = 17 * hash + (int) (timestamp ^ (timestamp >>> 32));
    hash = 17 * hash + (tombstoned ? 1 : 0);
    return hash;/*from  w  ww  . j ava2 s.  c  o  m*/
}

From source file:edu.oregonstate.eecs.mcplan.domains.spbj.SpBjAction.java

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

From source file:com.opengamma.analytics.math.matrix.DoubleMatrix1D.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + Arrays.hashCode(_data);
    return result;
}

From source file:org.diorite.utils.validator.string.StringAllowedCharsValidatorImpl.java

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

From source file:com.enonic.cms.core.portal.instruction.CreateContentUrlInstruction.java

@Override
public int hashCode() {
    int result = contentKey != null ? contentKey.hashCode() : 0;
    result = 31 * result + (params != null ? Arrays.hashCode(params) : 0);
    result = 31 * result + (createAsPermalink ? 1 : 0);
    return result;
}