Back to project page NexusData.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCT...
If you think the Android project NexusData listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.dkharrat.nexusdata.predicate; //from w w w .jav a2s . co m public class NotPredicate implements Predicate { private final Predicate predicate; public NotPredicate(Predicate predicate) { this.predicate = predicate; } public Predicate getPredicate() { return predicate; } @Override public <T> T accept(ExpressionVisitor<T> visitor) { return visitor.visit(this); } @Override public Boolean evaluate(Object object) { return !predicate.evaluate(object); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; NotPredicate that = (NotPredicate) o; if (!predicate.equals(that.predicate)) return false; return true; } @Override public int hashCode() { return ~predicate.hashCode(); } }