gnu.trove.map.TObjectIntMap.equals()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(100)

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

TObjectIntMap.equals介绍

[英]Compares the specified object with this map for equality. Returns true if the given object is also a map and the two maps represent the same mappings. More formally, two maps m1 and m2 represent the same mappings if m1.entrySet().equals(m2.entrySet()). This ensures that the equals method works properly across different implementations of the Map interface.
[中]将指定的对象与此映射进行相等性比较。如果给定对象也是一个映射,并且两个映射表示相同的映射,则返回true。更正式地说,两个映射m1和m2表示相同的映射。entrySet()。等于(m2.entrySet())。这可以确保equals方法在Map接口的不同实现中正常工作。

代码示例

代码示例来源:origin: alibaba/mdrill

public boolean equals( Object o ) {
  synchronized( mutex ) { return m.equals( o ); }
}
public int hashCode() {

代码示例来源:origin: alibaba/mdrill

public boolean equals(Object o) { return o == this || m.equals(o); }
public int hashCode()           { return m.hashCode(); }

代码示例来源:origin: net.sf.trove4j/core

public boolean equals( Object o ) {
  synchronized( mutex ) { return m.equals( o ); }
}
public int hashCode() {

代码示例来源:origin: com.palantir.patches.sourceforge/trove3

@Override
public boolean equals( Object o ) {
  synchronized( mutex ) { return m.equals( o ); }
}
@Override

代码示例来源:origin: com.palantir.patches.sourceforge/trove3

@Override
public boolean equals(Object o) { return o == this || m.equals(o); }
@Override

代码示例来源:origin: hernad/easyrec

public boolean equals( Object o ) {
  synchronized( mutex ) { return m.equals( o ); }
}
public int hashCode() {

代码示例来源:origin: net.sf.trove4j/core

public boolean equals(Object o) { return o == this || m.equals(o); }
public int hashCode()           { return m.hashCode(); }

代码示例来源:origin: hernad/easyrec

public boolean equals(Object o) { return o == this || m.equals(o); }
public int hashCode()           { return m.hashCode(); }

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

@Override
public boolean equals(Object obj) {
 if (this == obj) return true;
 if (obj == null) return false;
 if (getClass() != obj.getClass()) return false;
 HashMapLookup other = (HashMapLookup) obj;
 if (m == null) {
  if (other.m != null) return false;
 } else if (!m.equals(other.m)) return false;
 return true;
}

代码示例来源:origin: fozziethebeat/S-Space

if (o instanceof UndirectedMultigraph) {
  UndirectedMultigraph<?> dm = (UndirectedMultigraph<?>)(o);
  if (dm.typeCounts.equals(typeCounts)) {
    return vertexToEdges.equals(dm.vertexToEdges);

代码示例来源:origin: fozziethebeat/S-Space

if (o instanceof DirectedMultigraph) {
  DirectedMultigraph<?> dm = (DirectedMultigraph<?>)(o);
  if (dm.typeCounts.equals(typeCounts)) {
    return vertexToEdges.equals(dm.vertexToEdges);

代码示例来源:origin: fozziethebeat/S-Space

if (o instanceof WeightedDirectedMultigraph) {
  WeightedDirectedMultigraph<?> dm = (WeightedDirectedMultigraph<?>)(o);
  if (dm.typeCounts.equals(typeCounts)) {
    return vertexToEdges.equals(dm.vertexToEdges);

相关文章