本文整理了Java中groovy.lang.Tuple.equals()
方法的一些代码示例,展示了Tuple.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tuple.equals()
方法的具体详情如下:
包路径:groovy.lang.Tuple
类名称:Tuple
方法名:equals
暂无
代码示例来源:origin: groovy/groovy-core
public void testHashCodeAndEquals() {
Tuple a = new Tuple(new Object[]{"a", "b", "c"});
Tuple b = new Tuple(new Object[]{"a", "b", "c"});
Tuple c = new Tuple(new Object[]{"d", "b", "c"});
Tuple d = new Tuple(new Object[]{"a", "b"});
Tuple2<String, String> e = new Tuple2<String, String>("a", "b");
Tuple2<String, String> f = new Tuple2<String, String>("a", "c");
assertEquals("hashcode", a.hashCode(), b.hashCode());
assertTrue("hashcode", a.hashCode() != c.hashCode());
assertEquals("a and b", a, b);
assertFalse("a != c", a.equals(c));
assertFalse("!a.equals(null)", a.equals(null));
assertTrue("d.equals(e)", d.equals(e));
assertTrue("e.equals(d)", e.equals(d));
assertFalse("!e.equals(f)", e.equals(f));
assertFalse("!f.equals(e)", f.equals(e));
}
代码示例来源:origin: org.kohsuke.droovy/groovy
public boolean equals(Object that) {
if (that instanceof Tuple) {
return equals((Tuple) that);
}
return false;
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
public boolean equals(Object that) {
if (that instanceof Tuple) {
return equals((Tuple) that);
}
return false;
}
代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal
public boolean equals(Object that) {
if (that instanceof Tuple) {
return equals((Tuple) that);
}
return false;
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
public boolean equals(Object that) {
if (that instanceof Tuple) {
return equals((Tuple) that);
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!