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:net.kaczmarzyk.spring.data.jpa.domain.EqualEnum.java

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

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

/**
 * Returns true if a tag with the ID is found in the hashmap
 * //from  w  w w .  ja  v a 2 s  .c  o m
 * @param tagID
 * @return
 */
public boolean contains(byte[] tagID) {
    return this.tags.containsKey(Arrays.hashCode(tagID));
}

From source file:com.cedarsoft.crypt.Hash.java

/**
 * {@inheritDoc}//from   w  w w . j  a v a2 s  . co m
 */
@Override
public int hashCode() {
    int result;
    result = algorithm.hashCode();
    result = 31 * result + (value != null ? Arrays.hashCode(value) : 0);
    return result;
}

From source file:org.gachette.spi.graphprovider.collection.CollectionGraphProvider.java

private int calculateEvaluatorKey(Object object, Method method, Object[] parameters) {
    int hash = 1;
    hash = hash * 17 + object.hashCode();
    hash = hash * 31 + method.hashCode();
    if (parameters != null) {
        hash = hash * 13 + Arrays.hashCode(parameters);
    }/*from w  w  w  .  ja va 2  s .  co  m*/
    return hash;
}

From source file:org.fuin.esc.api.StreamEventsSlice.java

@Override
public final int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + (endOfStream ? 1231 : 1237);
    result = prime * result + fromEventNumber;
    result = prime * result + nextEventNumber;
    result = prime * result + ((events == null) ? 0 : Arrays.hashCode(events.toArray()));
    return result;
}

From source file:org.opendaylight.controller.switchmanager.Switch.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + Arrays.hashCode(dataLayerAddress);
    result = prime * result + ((node == null) ? 0 : node.hashCode());
    result = prime * result + ((nodeConnectors == null) ? 0 : nodeConnectors.hashCode());
    result = prime * result + ((spanPorts == null) ? 0 : spanPorts.hashCode());
    return result;
}

From source file:com.bitctrl.net.MAC.java

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

From source file:com.ables.pix.model.Album.java

@Override
public int hashCode() {
    int result = super.hashCode(); //To change body of generated methods, choose Tools | Templates.
    final int PRIME = 31;
    result = PRIME * result + ((creationDate == null) ? 0 : creationDate.hashCode());
    result = PRIME * result + ((description == null) ? 0 : description.hashCode());
    result = PRIME * result + ((id == null) ? 0 : id.hashCode());
    result = PRIME * result + ((name == null) ? 0 : name.hashCode());
    result = PRIME * result + ((user == null) ? 0 : user.hashCode());
    result = PRIME * result + Arrays.hashCode(labels);
    return result;
}

From source file:org.apache.cxf.fediz.service.idp.kerberos.KerberosServiceRequestToken.java

/**
 * Calculates hashcode based on the Kerberos token
 *///from w ww  .  j av a  2s.  com
@Override
public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + Arrays.hashCode(token);
    return result;
}

From source file:org.echocat.jomon.runtime.codec.HashFunctionSupport.java

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