/** * Copy an expression. This makes a deep copy. * * @return the copy of the original expression * @param rebindings variables that need to be re-bound */ /*@NotNull*/ public Expression copy(RebindingMap rebindings) { SubscriptExpression exp = new SubscriptExpression(getBaseExpression().copy(rebindings), getSubscript().copy(rebindings)); ExpressionTool.copyLocationInfo(this, exp); return exp; }
/** * Copy an expression. This makes a deep copy. * * @return the copy of the original expression * @param rebindings variables that need to be re-bound */ /*@NotNull*/ public Expression copy(RebindingMap rebindings) { SubscriptExpression exp = new SubscriptExpression(getBaseExpression().copy(rebindings), getSubscript().copy(rebindings)); ExpressionTool.copyLocationInfo(this, exp); return exp; }
return Literal.makeEmptySequence(); } else { return new SubscriptExpression(start, comparand); return new SubscriptExpression(start, comparand);
return Literal.makeEmptySequence(); } else { return new SubscriptExpression(start, comparand); return new SubscriptExpression(start, comparand);
result = FirstItemExpression.makeFirstItemExpression(getBase()); } else { result = new SubscriptExpression(getBase(), getFilter()); !Cardinality.allowsMany(getFilter().getCardinality()) && (getFilter().getDependencies() & StaticProperty.DEPENDS_ON_FOCUS) == 0) { Expression result = new SubscriptExpression(getBase(), getFilter()); if (tracing) { Optimizer.trace(config, "Rewriting numeric filter expression with focus-independent subscript", result);
result = FirstItemExpression.makeFirstItemExpression(getBase()); } else { result = new SubscriptExpression(getBase(), getFilter()); !Cardinality.allowsMany(getFilter().getCardinality()) && (getFilter().getDependencies() & StaticProperty.DEPENDS_ON_FOCUS) == 0) { Expression result = new SubscriptExpression(getBase(), getFilter()); if (tracing) { Optimizer.trace(config, "Rewriting numeric filter expression with focus-independent subscript", result);