java.awt.Rectangle.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(138)

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

Rectangle.hashCode介绍

[英]Returns the hashcode for this Rectangle.
[中]返回此Rectangle的哈希代码。

代码示例

代码示例来源:origin: org.activecomponents.jadex/jadex-applications-micro

/**
   *  Calculate the hash code.
   */
  public int hashCode()
  {
    int result = 1;
    result = 31 * result + ((area == null) ? 0 : area.hashCode());
//        result = 31 * result + ((providerid == null) ? 0 : providerid.hashCode());
    return result;
  }

代码示例来源:origin: nroduit/Weasis

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + (autoLevel ? 1231 : 1237);
  result = prime * result + brightness;
  long temp;
  temp = Double.doubleToLongBits(calibrationRatio);
  result = prime * result + (int) (temp ^ (temp >>> 32));
  result = prime * result + ((calibrationUnit == null) ? 0 : calibrationUnit.hashCode());
  result = prime * result + contrast;
  result = prime * result + ((cropZone == null) ? 0 : cropZone.hashCode());
  result = prime * result + (flip ? 1231 : 1237);
  result = prime * result + ((layerOffset == null) ? 0 : layerOffset.hashCode());
  result = prime * result + orientation;
  result = prime * result + rotation;
  result = prime * result + ((ratio == null) ? 0 : ratio.hashCode());
  return result;
}

相关文章