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; // w ww .j av a 2 s. c o m public class ConstantExpression<T> implements Expression<T> { private final T value; public ConstantExpression(T value) { this.value = value; } public T getValue() { return value; } @Override public T evaluate(Object object) { return getValue(); } @Override public <T> T accept(ExpressionVisitor<T> visitor) { return visitor.visit(this); } @Override public String toString() { return value == null ? null : value.toString(); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ConstantExpression that = (ConstantExpression) o; if (value != null ? !value.equals(that.value) : that.value != null) return false; return true; } @Override public int hashCode() { return value != null ? value.hashCode() : 0; } }