org.eclipse.swt.graphics.RGB.hashCode()方法的使用及代码示例

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

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

RGB.hashCode介绍

[英]Returns an integer hash code for the receiver. Any two objects that return true when passed to equals must return the same value for this method.
[中]返回接收器的整数哈希代码。当传递给equals时返回true的任何两个对象必须为此方法返回相同的值。

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms

@Override
  public int hashCode() {
    int hash = 0;
    for (RGB fRGB : fRGBs)
      hash = hash * 7 + fRGB.hashCode();
    hash = hash * 7 + fLength;
    return hash;
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

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

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms

@Override
  public int hashCode() {
    int hash = 0;
    for (RGB fRGB : fRGBs)
      hash = hash * 7 + fRGB.hashCode();
    hash = hash * 7 + fLength;
    return hash;
  }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

public int hashCode() {
  return color.hashCode();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

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

代码示例来源:origin: org.eclipse.mylyn.wikitext/ui

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + ((background == null) ? 0 : background.hashCode());
  result = prime * result + ((foreground == null) ? 0 : foreground.hashCode());
  result = prime * result + Float.floatToIntBits(sizeFactor);
  result = prime * result + state;
  return result;
}

代码示例来源:origin: rinde/RinSim

@Override
public int hashCode() {
 int h = 1;
 h *= 1000003;
 h ^= this.reliableColor.hashCode();
 h *= 1000003;
 h ^= this.unreliableColor.hashCode();
 h *= 1000003;
 h ^= this.viewOptions.hashCode();
 return h;
}

相关文章