java.math.BigDecimal.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(152)

本文整理了Java中java.math.BigDecimal.hashCode()方法的一些代码示例,展示了BigDecimal.hashCode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BigDecimal.hashCode()方法的具体详情如下:
包路径:java.math.BigDecimal
类名称:BigDecimal
方法名:hashCode

BigDecimal.hashCode介绍

[英]Cache for the hash code.
[中]哈希代码的缓存。

代码示例

代码示例来源:origin: openhab/openhab1-addons

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

代码示例来源:origin: hibernate/hibernate-orm

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

代码示例来源:origin: com.h2database/h2

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

代码示例来源:origin: knowm/XChange

@Override
 public int hashCode() {
  return makerFee.hashCode() + 31 * takerFee.hashCode();
 }
}

代码示例来源:origin: apache/kylin

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

代码示例来源:origin: knowm/XChange

@Override
public int hashCode() {
 final int prime = 31;
 int result = 1;
 result = prime * result + ((currency == null) ? 0 : currency.hashCode());
 result = prime * result + dayPeriod;
 result = prime * result + ((id == null) ? 0 : id.hashCode());
 result = prime * result + ((timestamp == null) ? 0 : timestamp.hashCode());
 result = prime * result + ((originalAmount == null) ? 0 : originalAmount.hashCode());
 result = prime * result + ((type == null) ? 0 : type.hashCode());
 return result;
}

代码示例来源:origin: knowm/XChange

@Override
public int hashCode() {
 int hash = super.hashCode();
 hash = 59 * hash + (this.stopPrice != null ? this.stopPrice.hashCode() : 0);
 return hash;
}

代码示例来源:origin: knowm/XChange

@Override
public int hashCode() {
 int result = 1;
 result = 31 * result + ((pair == null) ? 0 : pair.hashCode());
 result = 31 * result + ((price == null) ? 0 : price.hashCode());
 return result;
}

代码示例来源:origin: knowm/XChange

@Override
public int hashCode() {
 final int prime = 31;
 int result = super.hashCode();
 result = prime * result + ((rate == null) ? 0 : rate.hashCode());
 return result;
}

代码示例来源:origin: knowm/XChange

@Override
public int hashCode() {
 int hash = super.hashCode();
 hash = 59 * hash + (this.limitPrice != null ? this.limitPrice.hashCode() : 0);
 return hash;
}

代码示例来源:origin: apache/hive

@HiveDecimalVersionV1
@Override
public int hashCode() {
 return bd.hashCode();
}

代码示例来源:origin: hibernate/hibernate-orm

@Override
  public int hashCode() {
    int result = sequence;
    result = 31 * result + ( x != null ? x.hashCode() : 0 );
    result = 31 * result + ( y != null ? y.hashCode() : 0 );
    result = 31 * result + ( description != null ? description.hashCode() : 0 );
    return result;
  }
}

代码示例来源:origin: knowm/XChange

@Override
public int hashCode() {
 int hash = 7;
 hash = 83 * hash + (this.type != null ? this.type.hashCode() : 0);
 hash = 83 * hash + (this.originalAmount != null ? this.originalAmount.hashCode() : 0);
 hash = 83 * hash + (this.currencyPair != null ? this.currencyPair.hashCode() : 0);
 hash = 83 * hash + (this.id != null ? this.id.hashCode() : 0);
 hash = 83 * hash + (this.timestamp != null ? this.timestamp.hashCode() : 0);
 return hash;
}

代码示例来源:origin: hibernate/hibernate-orm

public int hashCode() {
  int result;
  result = value.hashCode();
  result = 29 * result + currency.hashCode();
  return result;
}

代码示例来源:origin: killbill/killbill

@Override
public int hashCode() {
  int result = numberOfUnpaidInvoicesEqualsOrExceeds != null ? numberOfUnpaidInvoicesEqualsOrExceeds.hashCode() : 0;
  result = 31 * result + (totalUnpaidInvoiceBalanceEqualsOrExceeds != null ? totalUnpaidInvoiceBalanceEqualsOrExceeds.hashCode() : 0);
  result = 31 * result + (timeSinceEarliestUnpaidInvoiceEqualsOrExceeds != null ? timeSinceEarliestUnpaidInvoiceEqualsOrExceeds.hashCode() : 0);
  result = 31 * result + Arrays.hashCode(responseForLastFailedPayment);
  result = 31 * result + (controlTagInclusion != null ? controlTagInclusion.hashCode() : 0);
  result = 31 * result + (controlTagExclusion != null ? controlTagExclusion.hashCode() : 0);
  return result;
}

代码示例来源:origin: hibernate/hibernate-orm

@Override
public int hashCode(Object x) throws HibernateException {
  return ( (MonetoryAmount) x ).getAmount().hashCode();
}

代码示例来源:origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getAmount() == null) ? 0 : getAmount().hashCode());
  hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().hashCode());
  return hashCode;
}

代码示例来源:origin: hibernate/hibernate-orm

public int hashCode(Object x) throws HibernateException {
  return ( (MonetaryAmount) x ).getAmount().hashCode();
}

代码示例来源:origin: hibernate/hibernate-orm

public int hashCode(Object x) throws HibernateException {
  return ( (MonetaryAmount) x ).getAmount().hashCode();
}

代码示例来源:origin: hibernate/hibernate-orm

@Override
public int hashCode(Object x) throws HibernateException {
  if (!(x instanceof DollarValue)) {
    throw new HibernateException("Expected DollarValue");
  }
  return ((DollarValue)x).getAmount().hashCode();
}

相关文章

微信公众号

最新文章

更多