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:hudson.plugins.filesfoundtrigger.FilesFoundTriggerCause.java

/**
 * {@inheritDoc}//w  w  w . ja va  2 s.c om
 */
@Override
public int hashCode() {
    return Arrays.hashCode(new String[] { directory, files, ignoredFiles });
}

From source file:com.phoenixst.collections.AllPredicate.java

public int hashCode() {
    return Arrays.hashCode(predicateArray);
}

From source file:com.jivesoftware.os.amza.api.partition.PartitionName.java

@Override
public int hashCode() {
    if (hash == 0) {
        int hashCode = 3;
        hashCode = 59 * hashCode + (this.systemPartition ? 1 : 0);
        hashCode = 59 * hashCode + Arrays.hashCode(this.ringName);
        hashCode = 59 * hashCode + Arrays.hashCode(this.name);
        hashCode = 59 * hashCode + 0; // legacy
        hash = hashCode;//from   ww w.j a  v a  2s.co m
    }
    return hash;
}

From source file:org.apache.tika.eval.tokens.TokenStatistics.java

@Override
public int hashCode() {
    int result;//from  w ww  .j av a 2s  .  co  m
    long temp;
    result = (int) (totalTokens ^ (totalTokens >>> 32));
    result = 31 * result + (int) (totalUniqueTokens ^ (totalUniqueTokens >>> 32));
    result = 31 * result + Arrays.hashCode(topN);
    temp = Double.doubleToLongBits(entropy);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    result = 31 * result + summaryStatistics.hashCode();
    return result;
}

From source file:biz.netcentric.cq.tools.actool.helper.AceBean.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + Arrays.hashCode(actions);
    result = prime * result + ((actionsStringFromConfig == null) ? 0 : actionsStringFromConfig.hashCode());
    result = prime * result + ((jcrPath == null) ? 0 : jcrPath.hashCode());
    result = prime * result + ((permission == null) ? 0 : permission.hashCode());
    result = prime * result + ((principal == null) ? 0 : principal.hashCode());
    result = prime * result + ((privilegesString == null) ? 0 : privilegesString.hashCode());
    result = prime * result + ((repGlob == null) ? 0 : repGlob.hashCode());
    return result;
}

From source file:mase.me.MESubpopulation.java

protected int hash(int[] array) {
    return Arrays.hashCode(array);
}

From source file:com.ongtonnesoup.permissions.PerMissions.java

/**
 * Request permission or show explanations, if necessary
 *
 * @param permissions Permissions to request
 * @param flows       Code to execute if granted or denied
 *//*from w ww . j  a  v  a 2  s . c  o  m*/
public void getPermission(String[] permissions, PerMissionsFlows flows, boolean isAfterExplanation) {

    if (PermissionUtil.hasSelfPermission(getActivity(), permissions)) {
        Log.d(TAG, "Permission request already granted");
        callback.onPermissionGranted(permissions, flows.getContinueFlow());
    } else {
        String[] permissionsToRequest = PermissionUtil.deniedPermissions(getActivity(), permissions);
        if (PermissionUtil.showExplanation(getActivity(), permissions) && !isAfterExplanation) {
            Log.d(TAG, "Permission request should show explanation");
            callback.onPermissionExplain(permissionsToRequest, flows);
        } else {
            this.flows.put(Arrays.hashCode(permissionsToRequest), flows);
            requestPermissions(permissionsToRequest, REQUEST_PERMISSIONS);
        }

    }
}

From source file:twitter4j.internal.json.IDsJSONImpl.java

@Override
public int hashCode() {
    return ids != null ? Arrays.hashCode(ids) : 0;
}

From source file:hr.caellian.m3l.util.nbt.NbtSerializable.java

/**
 * @return Object hashcode./*from   w  w w.  ja  v a2s.c o  m*/
 */
@Override
public int hashCode() {
    int result = super.hashCode();
    result = 31 * result + Arrays.hashCode(this.getDataValue());
    return result;
}

From source file:com.opengamma.analytics.financial.forex.convention.ForexQuoteConvention.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + Arrays.hashCode(_atmType);
    result = prime * result + ((_atmTypeCutoff == null) ? 0 : _atmTypeCutoff.hashCode());
    result = prime * result + _ccy1.hashCode();
    result = prime * result + _ccy2.hashCode();
    result = prime * result + Arrays.hashCode(_deltaType);
    result = prime * result + ((_deltaTypeCutoff == null) ? 0 : _deltaTypeCutoff.hashCode());
    result = prime * result + (_isPremiumAdjusted ? 1231 : 1237);
    result = prime * result + _premiumCurrency.hashCode();
    return result;
}