All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.joo.libra.sql.node.NumberExpressionNode Maven / Gradle / Ivy

There is a newer version: 2.1.2
Show newest version
package org.joo.libra.sql.node;

import org.joo.libra.Predicate;
import org.joo.libra.common.SimpleLiteralPredicate;
import org.joo.libra.support.NumericComparator;

public class NumberExpressionNode extends ValueExpressionNode {

	public NumberExpressionNode() {

	}

	public NumberExpressionNode(final Number value) {
		this.value = value;
	}

	@Override
	public Predicate buildPredicate() {
		return new SimpleLiteralPredicate(value, value != null && NumericComparator.compare(value, 0) != 0);
	}

	public String toString() {
		return value + "";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy