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.opengamma.analytics.math.curve.SpreadDoublesCurve.java

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

From source file:com.opengamma.analytics.financial.model.volatility.smile.fitting.sabr.StandardSmileSurfaceDataBundle.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + _forwardCurve.hashCode();
    result = prime * result + Arrays.deepHashCode(_impliedVols);

    result = prime * result + Arrays.deepHashCode(_strikes);
    result = prime * result + Arrays.hashCode(_expiries);
    return result;
}

From source file:com.opengamma.analytics.financial.interestrate.annuity.derivative.Annuity.java

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

From source file:net.opentsdb.query.filter.TagVWildcardFilter.java

@Override
public int hashCode() {
    return Objects.hashCode(tagk, Arrays.hashCode(components), case_insensitive);
}

From source file:org.killbill.billing.plugin.avatax.client.model.GetTaxResult.java

@Override
public int hashCode() {
    int result;//w ww . j  ava2  s  .c o m
    long temp;
    result = DocCode != null ? DocCode.hashCode() : 0;
    result = 31 * result + (DocDate != null ? DocDate.hashCode() : 0);
    result = 31 * result + (Timestamp != null ? Timestamp.hashCode() : 0);
    temp = Double.doubleToLongBits(TotalAmount);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(TotalDiscount);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(TotalExemption);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(TotalTaxable);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(TotalTax);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(TotalTaxCalculated);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    result = 31 * result + (TaxDate != null ? TaxDate.hashCode() : 0);
    result = 31 * result + (TaxLines != null ? Arrays.hashCode(TaxLines) : 0);
    result = 31 * result + (TaxSummary != null ? Arrays.hashCode(TaxSummary) : 0);
    result = 31 * result + (TaxAddresses != null ? Arrays.hashCode(TaxAddresses) : 0);
    result = 31 * result + (ResultCode != null ? ResultCode.hashCode() : 0);
    result = 31 * result + (Messages != null ? Arrays.hashCode(Messages) : 0);
    return result;
}

From source file:com.vrem.wifianalyzer.wifi.graphutils.GraphViewWrapper.java

public int calculateGraphType() {
    try {//from  ww  w  .ja v  a2  s . co  m
        String graphType = BuildConfig.APPLICATION_ID;
        MessageDigest messageDigest = MessageDigest.getInstance("MD5");
        messageDigest.update(graphType.getBytes());
        return Arrays.hashCode(messageDigest.digest());
    } catch (Exception e) {
        return TYPE1;
    }
}

From source file:io.druid.query.aggregation.HistogramAggregatorFactory.java

@Override
public int hashCode() {
    int result = name != null ? name.hashCode() : 0;
    result = 31 * result + (fieldName != null ? fieldName.hashCode() : 0);
    result = 31 * result + (breaksList != null ? breaksList.hashCode() : 0);
    result = 31 * result + (breaks != null ? Arrays.hashCode(breaks) : 0);
    return result;
}

From source file:org.apache.kylin.dict.lookup.SnapshotTable.java

/**
 * a naive implementation//from ww w. j  a  va 2  s. c  om
 *
 * @return
 */
@Override
public int hashCode() {
    int[] parts = new int[this.rowIndices.size()];
    for (int i = 0; i < parts.length; ++i)
        parts[i] = Arrays.hashCode(this.rowIndices.get(i));
    return Arrays.hashCode(parts);
}

From source file:com.google.android.gm.ay.java

public static void a(final Context context, final String s, final String s2, final long n, final int n2) {
    final List<String> b = com.google.android.gm.persistence.b.DD().b(context, true);
    int size;//from   ww w.  java 2 s.c  o  m
    if (b != null && b.size() > 0) {
        size = b.size();
    } else {
        size = 1;
    }
    final String quantityString = context.getResources().getQuantityString(n2, size);
    final ab ab = new ab(context);
    if (size > 1) {
        final String string = context.getResources().getString(2131297166, new Object[] { s });
        final SpannableString spannableString = new SpannableString(
                (CharSequence) String.format(quantityString, string));
        final int index = spannableString.toString().indexOf(string);
        spannableString.setSpan((Object) new TextAppearanceSpan(context, 2131231210), index,
                index + string.length(), 0);
        ab.b((CharSequence) spannableString);
        ab.e((CharSequence) spannableString);
    } else {
        ab.b(quantityString);
        ab.e((CharSequence) quantityString);
    }
    final int hashCode = Arrays.hashCode(new Object[] { n, s2 });
    final Account x = x(context, s);
    final Folder h = h(context, s, "^^out");
    Intent a;
    if (h == null || s == null) {
        E.f(ay.mW, "Null account or folder.  account: %s folder: %s", x, h);
        a = null;
    } else {
        a = ag.a(context, h.azZ.aPj, x);
    }
    final NotificationManager notificationManager = (NotificationManager) context
            .getSystemService("notification");
    ab.h(17301624);
    ab.a(System.currentTimeMillis());
    ab.c(s2);
    ab.a(PendingIntent.getActivity(context, -1, a, 0));
    ArrayList<Integer> list = ay.aZj.get(s);
    if (list == null) {
        list = new ArrayList<Integer>();
    }
    list.add(hashCode);
    ay.aZj.put(s, list);
    notificationManager.notify(hashCode, ab.build());
}

From source file:com.opengamma.analytics.financial.interestrate.future.derivative.BondFuture.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + Arrays.hashCode(_conversionFactor);
    result = prime * result + Arrays.hashCode(_deliveryBasket);
    long temp;/* www .  ja v a  2s.c o m*/
    temp = Double.doubleToLongBits(_deliveryFirstTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_deliveryLastTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_noticeFirstTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_noticeLastTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_notional);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_tradingLastTime);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}