本文整理了Java中com.google.common.base.Converter.equals()
方法的一些代码示例,展示了Converter.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Converter.equals()
方法的具体详情如下:
包路径:com.google.common.base.Converter
类名称:Converter
方法名:equals
[英]Indicates whether another object is equal to this converter.
Most implementations will have no reason to override the behavior of Object#equals. However, an implementation may also choose to return true whenever object is a Converter that it considers interchangeable with this one. "Interchangeable" typically means that Objects.equal(this.convert(a), that.convert(a)) is true for all a of type A (and similarly for reverse). Note that a falseresult from this method does not imply that the converters are known not to be interchangeable.
[中]指示另一个对象是否等于此转换器。
大多数实现都没有理由重写Object#equals的行为。然而,只要对象是它认为可以与此对象互换的转换器,实现也可以选择返回true。“可互换”通常指的是对象。等于(这个。转换成(a),那。convert(a))适用于所有类型a(同样适用于reverse)。请注意,此方法得出的错误结果并不意味着已知转换器不可互换。
代码示例来源:origin: google/guava
@Override
public boolean equals(@Nullable Object object) {
if (object instanceof ConverterComposition) {
ConverterComposition<?, ?, ?> that = (ConverterComposition<?, ?, ?>) object;
return this.first.equals(that.first) && this.second.equals(that.second);
}
return false;
}
代码示例来源:origin: google/guava
@Override
public boolean equals(@Nullable Object object) {
if (object instanceof ReverseConverter) {
ReverseConverter<?, ?> that = (ReverseConverter<?, ?>) object;
return this.original.equals(that.original);
}
return false;
}
代码示例来源:origin: google/j2objc
@Override
public boolean equals(@NullableDecl Object object) {
if (object instanceof ConverterComposition) {
ConverterComposition<?, ?, ?> that = (ConverterComposition<?, ?, ?>) object;
return this.first.equals(that.first) && this.second.equals(that.second);
}
return false;
}
代码示例来源:origin: wildfly/wildfly
@Override
public boolean equals(@NullableDecl Object object) {
if (object instanceof ConverterComposition) {
ConverterComposition<?, ?, ?> that = (ConverterComposition<?, ?, ?>) object;
return this.first.equals(that.first) && this.second.equals(that.second);
}
return false;
}
代码示例来源:origin: google/j2objc
@Override
public boolean equals(@NullableDecl Object object) {
if (object instanceof ReverseConverter) {
ReverseConverter<?, ?> that = (ReverseConverter<?, ?>) object;
return this.original.equals(that.original);
}
return false;
}
代码示例来源:origin: wildfly/wildfly
@Override
public boolean equals(@NullableDecl Object object) {
if (object instanceof ReverseConverter) {
ReverseConverter<?, ?> that = (ReverseConverter<?, ?>) object;
return this.original.equals(that.original);
}
return false;
}
代码示例来源:origin: org.jsimpledb/jsimpledb-main
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
if (obj == null || obj.getClass() != this.getClass())
return false;
final Index3Converter<?, ?, ?, ?, ?, ?, ?, ?> that = (Index3Converter<?, ?, ?, ?, ?, ?, ?, ?>)obj;
return this.value1Converter.equals(that.value1Converter)
&& this.value2Converter.equals(that.value2Converter)
&& this.value3Converter.equals(that.value3Converter)
&& this.targetConverter.equals(that.targetConverter);
}
代码示例来源:origin: io.permazen/permazen-main
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
if (obj == null || obj.getClass() != this.getClass())
return false;
final Tuple4Converter<?, ?, ?, ?, ?, ?, ?, ?> that = (Tuple4Converter<?, ?, ?, ?, ?, ?, ?, ?>)obj;
return this.value1Converter.equals(that.value1Converter)
&& this.value2Converter.equals(that.value2Converter)
&& this.value3Converter.equals(that.value3Converter)
&& this.value4Converter.equals(that.value4Converter);
}
代码示例来源:origin: org.jsimpledb/jsimpledb-main
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
if (obj == null || obj.getClass() != this.getClass())
return false;
final Tuple4Converter<?, ?, ?, ?, ?, ?, ?, ?> that = (Tuple4Converter<?, ?, ?, ?, ?, ?, ?, ?>)obj;
return this.value1Converter.equals(that.value1Converter)
&& this.value2Converter.equals(that.value2Converter)
&& this.value3Converter.equals(that.value3Converter)
&& this.value4Converter.equals(that.value4Converter);
}
代码示例来源:origin: com.google.guava/guava-jdk5
@Override
public boolean equals(@Nullable Object object) {
if (object instanceof ConverterComposition) {
ConverterComposition<?, ?, ?> that = (ConverterComposition<?, ?, ?>) object;
return this.first.equals(that.first)
&& this.second.equals(that.second);
}
return false;
}
代码示例来源:origin: org.jsimpledb/jsimpledb-main
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
if (obj == null || obj.getClass() != this.getClass())
return false;
final Tuple3Converter<?, ?, ?, ?, ?, ?> that = (Tuple3Converter<?, ?, ?, ?, ?, ?>)obj;
return this.value1Converter.equals(that.value1Converter)
&& this.value2Converter.equals(that.value2Converter)
&& this.value3Converter.equals(that.value3Converter);
}
代码示例来源:origin: io.permazen/permazen-main
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
if (obj == null || obj.getClass() != this.getClass())
return false;
final Index2Converter<?, ?, ?, ?, ?, ?> that = (Index2Converter<?, ?, ?, ?, ?, ?>)obj;
return this.value1Converter.equals(that.value1Converter)
&& this.value2Converter.equals(that.value2Converter)
&& this.targetConverter.equals(that.targetConverter);
}
代码示例来源:origin: io.permazen/permazen-main
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
if (obj == null || obj.getClass() != this.getClass())
return false;
final NavigableMapConverter<?, ?, ?, ?> that = (NavigableMapConverter<?, ?, ?, ?>)obj;
return this.keyConverter.equals(that.keyConverter) && this.valueConverter.equals(that.valueConverter);
}
代码示例来源:origin: org.jsimpledb/jsimpledb-main
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
if (obj == null || obj.getClass() != this.getClass())
return false;
final Tuple2Converter<?, ?, ?, ?> that = (Tuple2Converter<?, ?, ?, ?>)obj;
return this.value1Converter.equals(that.value1Converter)
&& this.value2Converter.equals(that.value2Converter);
}
代码示例来源:origin: org.jsimpledb/jsimpledb-main
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
if (obj == null || obj.getClass() != this.getClass())
return false;
final NavigableMapConverter<?, ?, ?, ?> that = (NavigableMapConverter<?, ?, ?, ?>)obj;
return this.keyConverter.equals(that.keyConverter) && this.valueConverter.equals(that.valueConverter);
}
代码示例来源:origin: Nextdoor/bender
@Override
public boolean equals(@Nullable Object object) {
if (object instanceof ReverseConverter) {
ReverseConverter<?, ?> that = (ReverseConverter<?, ?>) object;
return this.original.equals(that.original);
}
return false;
}
代码示例来源:origin: io.permazen/permazen-main
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
if (obj == null || obj.getClass() != this.getClass())
return false;
final ListConverter<?, ?> that = (ListConverter<?, ?>)obj;
return this.elementConverter.equals(that.elementConverter);
}
代码示例来源:origin: io.permazen/permazen-main
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
if (obj == null || obj.getClass() != this.getClass())
return false;
final NavigableSetConverter<?, ?> that = (NavigableSetConverter<?, ?>)obj;
return this.elementConverter.equals(that.elementConverter);
}
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
@Override
public boolean equals(@Nullable Object object) {
if (object instanceof ConverterComposition) {
ConverterComposition<?, ?, ?> that = (ConverterComposition<?, ?, ?>) object;
return this.first.equals(that.first) && this.second.equals(that.second);
}
return false;
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
@Override
public boolean equals(@NullableDecl Object object) {
if (object instanceof ReverseConverter) {
ReverseConverter<?, ?> that = (ReverseConverter<?, ?>) object;
return this.original.equals(that.original);
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!