gpt4 book ai didi

cesiumlanguagewriter.YearMonthDay.hashCode()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 15:01:31 24 4
gpt4 key购买 nike

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

YearMonthDay.hashCode介绍

[英]Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
[中]返回此实例的哈希代码,该代码适用于哈希算法和哈希表等数据结构。

代码示例

代码示例来源:origin: AnalyticalGraphicsInc/czml-writer

/**
*  
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.

* @return A hash code for the current object.
*/
@Override
public int hashCode() {
  return HashCode.combine(m_yearMonthDay.hashCode(), Integer.hashCode(m_hour), Integer.hashCode(m_minute), Double.hashCode(m_second));
}

代码示例来源:origin: AnalyticalGraphicsInc/czml-writer

/**
*  
Tests that YearMonthDay.GetHashCode returns something at least reasonably random.

*/
@Test
public final void testGetHashCode() {
  YearMonthDay ymd1 = new YearMonthDay(2006, 3, 14);
  YearMonthDay ymd2 = new YearMonthDay(2006, 3, 14);
  YearMonthDay ymd3 = new YearMonthDay(2006, 5, 26);
  Assert.assertEquals((int) ymd1.hashCode(), (int) ymd2.hashCode());
  AssertHelper.assertNotEqual(ymd1.hashCode(), ymd3.hashCode());
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com