本文整理了Java中com.google.common.base.Predicate.equals()
方法的一些代码示例,展示了Predicate.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Predicate.equals()
方法的具体详情如下:
包路径:com.google.common.base.Predicate
类名称:Predicate
方法名:equals
[英]Indicates whether another object is equal to this predicate.
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 Predicate that it considers interchangeable with this one. "Interchangeable" typically means that this.apply(t) == that.apply(t) for all t of type T). Note that a false result from this method does not imply that the predicates are known not to be interchangeable.
[中]指示另一个对象是否等于此谓词。
大多数实现没有理由重写对象#equals的行为。然而,一个实现也可以选择返回true,只要object是它认为可以与这个谓词互换的谓词。“可互换性”通常意味着这一点。应用(t)==那个。适用于所有类型的t)。请注意,此方法的错误结果并不意味着已知谓词不可互换。
代码示例来源:origin: google/guava
@Override
public boolean equals(@Nullable Object obj) {
if (obj instanceof NotPredicate) {
NotPredicate<?> that = (NotPredicate<?>) obj;
return predicate.equals(that.predicate);
}
return false;
}
代码示例来源:origin: google/guava
@Override
public boolean equals(@Nullable Object obj) {
if (obj instanceof PredicateFunction) {
PredicateFunction<?> that = (PredicateFunction<?>) obj;
return predicate.equals(that.predicate);
}
return false;
}
代码示例来源:origin: google/j2objc
@Override
public boolean equals(@NullableDecl Object obj) {
if (obj instanceof NotPredicate) {
NotPredicate<?> that = (NotPredicate<?>) obj;
return predicate.equals(that.predicate);
}
return false;
}
代码示例来源:origin: google/j2objc
@Override
public boolean equals(@NullableDecl Object obj) {
if (obj instanceof PredicateFunction) {
PredicateFunction<?> that = (PredicateFunction<?>) obj;
return predicate.equals(that.predicate);
}
return false;
}
代码示例来源:origin: google/guava
@Override
public boolean equals(@Nullable Object obj) {
if (obj instanceof CompositionPredicate) {
CompositionPredicate<?, ?> that = (CompositionPredicate<?, ?>) obj;
return f.equals(that.f) && p.equals(that.p);
}
return false;
}
代码示例来源:origin: wildfly/wildfly
@Override
public boolean equals(@NullableDecl Object obj) {
if (obj instanceof PredicateFunction) {
PredicateFunction<?> that = (PredicateFunction<?>) obj;
return predicate.equals(that.predicate);
}
return false;
}
代码示例来源:origin: wildfly/wildfly
@Override
public boolean equals(@NullableDecl Object obj) {
if (obj instanceof NotPredicate) {
NotPredicate<?> that = (NotPredicate<?>) obj;
return predicate.equals(that.predicate);
}
return false;
}
代码示例来源:origin: google/j2objc
@Override
public boolean equals(@NullableDecl Object obj) {
if (obj instanceof CompositionPredicate) {
CompositionPredicate<?, ?> that = (CompositionPredicate<?, ?>) obj;
return f.equals(that.f) && p.equals(that.p);
}
return false;
}
代码示例来源:origin: wildfly/wildfly
@Override
public boolean equals(@NullableDecl Object obj) {
if (obj instanceof CompositionPredicate) {
CompositionPredicate<?, ?> that = (CompositionPredicate<?, ?>) obj;
return f.equals(that.f) && p.equals(that.p);
}
return false;
}
代码示例来源:origin: com.diffplug.guava/guava-core
@Override
public boolean equals(@Nullable Object obj) {
if (obj instanceof PredicateFunction) {
PredicateFunction<?> that = (PredicateFunction<?>) obj;
return predicate.equals(that.predicate);
}
return false;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override public boolean equals(@Nullable Object obj) {
if (obj instanceof PredicateFunction) {
PredicateFunction<?> that = (PredicateFunction<?>) obj;
return predicate.equals(that.predicate);
}
return false;
}
代码示例来源:origin: Nextdoor/bender
@Override public boolean equals(@Nullable Object obj) {
if (obj instanceof NotPredicate) {
NotPredicate<?> that = (NotPredicate<?>) obj;
return predicate.equals(that.predicate);
}
return false;
}
@Override public String toString() {
代码示例来源:origin: com.diffplug.guava/guava-core
@Override
public boolean equals(@Nullable Object obj) {
if (obj instanceof NotPredicate) {
NotPredicate<?> that = (NotPredicate<?>) obj;
return predicate.equals(that.predicate);
}
return false;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava
@Override public boolean equals(@Nullable Object obj) {
if (obj instanceof PredicateFunction) {
PredicateFunction<?> that = (PredicateFunction<?>) obj;
return predicate.equals(that.predicate);
}
return false;
}
代码示例来源:origin: io.brooklyn/brooklyn-core
/** @deprecated since 0.6; default is true, see {@link #checkSuccess} */
@Deprecated
public boolean isFailOnNonZeroResultCode() {
return super.getCheckSuccess().equals(DEFAULT_SUCCESS);
}
代码示例来源:origin: com.diffplug.guava/guava-core
@Override
public boolean equals(@Nullable Object obj) {
if (obj instanceof CompositionPredicate) {
CompositionPredicate<?, ?> that = (CompositionPredicate<?, ?>) obj;
return f.equals(that.f) && p.equals(that.p);
}
return false;
}
代码示例来源:origin: com.google.guava/guava-jdk5
@Override public boolean equals(@Nullable Object obj) {
if (obj instanceof CompositionPredicate) {
CompositionPredicate<?, ?> that = (CompositionPredicate<?, ?>) obj;
return f.equals(that.f) && p.equals(that.p);
}
return false;
}
代码示例来源:origin: net.sf.jung/jung-visualization
/**
* Quick test to allow optimization of <code>getFilteredEdges()</code>.
* @return <code>true</code> if there is an active edge filtering
* mechanism for this visualization, <code>false</code> otherwise
*/
protected boolean edgesAreFiltered() {
Predicate<Context<Graph<V,E>,E>> edgeIncludePredicate =
vv.getRenderContext().getEdgeIncludePredicate();
return edgeIncludePredicate != null &&
edgeIncludePredicate.equals(Predicates.alwaysTrue()) == false;
}
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
@Override
public boolean equals(@Nullable Object obj) {
if (obj instanceof CompositionPredicate) {
CompositionPredicate<?, ?> that = (CompositionPredicate<?, ?>) obj;
return f.equals(that.f) && p.equals(that.p);
}
return false;
}
代码示例来源:origin: net.shibboleth.idp/idp-saml-impl
/** {@inheritDoc} */
@Override
protected void doInitialize() throws ComponentInitializationException {
super.doInitialize();
if (!getActivationCondition().equals(Predicates.alwaysFalse())) {
if (sessionResolver == null) {
throw new ComponentInitializationException("SessionResolver cannot be null");
} else if (sessionManager == null) {
throw new ComponentInitializationException("SessionManager cannot be null");
}
}
}
内容来源于网络,如有侵权,请联系作者删除!