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

co.streamx.fluent.extree.expression.ParameterExpression Maven / Gradle / Ivy

The newest version!
package co.streamx.fluent.extree.expression;

import lombok.Getter;

/**
 * Represents an indexed parameter expression.
 * 
 * 
 */

@Getter
public final class ParameterExpression extends Expression {

	private final int index;

	ParameterExpression(Class resultType, int index) {
		super(ExpressionType.Parameter, resultType);

		if (index < 0)
			throw new IndexOutOfBoundsException("index");

		this.index = index;
	}

	@Override
	protected  T visit(ExpressionVisitor v) {
		return v.visit(this);
	}

	@Override
	public String toString() {
		return "P" + getIndex();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy