EvaluationExpression extends AbstractSopremoType implements ISopremoType,
		Iterable<EvaluationExpression> { public EvaluationExpression replace(final EvaluationExpression toReplace, final EvaluationExpression replaceFragment) { return this.replace(Predicates.equalTo(toReplace), replaceFragment); }  @Override void appendAsString(final Appendable appendable); @Override EvaluationExpression clone(); @Override boolean equals(final Object obj); abstract IJsonNode evaluate(IJsonNode node); @SuppressWarnings("unchecked") List<T> findAll(final Class<T> evaluableClass); List<EvaluationExpression> findAll(final Predicate<? super EvaluationExpression> predicate); @SuppressWarnings("unchecked") T findFirst(final Class<T> evaluableClass); EvaluationExpression findFirst(final Predicate<? super EvaluationExpression> predicate); @Override int hashCode(); @Override ChildIterator iterator(); String printAsTree(); EvaluationExpression remove(final Class<?> expressionType); EvaluationExpression remove(final EvaluationExpression expressionToRemove); EvaluationExpression remove(final Predicate<? super EvaluationExpression> predicate); EvaluationExpression replace(final EvaluationExpression toReplace, final EvaluationExpression replaceFragment); EvaluationExpression replace(final Predicate<? super EvaluationExpression> replacePredicate,
			final EvaluationExpression replaceFragment); EvaluationExpression replace(final Predicate<? super EvaluationExpression> replacePredicate,
			final Function<EvaluationExpression, EvaluationExpression> replaceFunction); EvaluationExpression simplify(); EvaluationExpression transformRecursively(final Function<EvaluationExpression, EvaluationExpression> function); static final PathSegmentExpression VALUE; }
@Test public void shouldReplaceValues() { final EvaluationExpression path = new ComparativeExpression(createPath("0", "id"), BinaryOperator.EQUAL, createPath("1", "userid")); final EvaluationExpression expected = new ComparativeExpression(createPath("[0]", "id"), BinaryOperator.EQUAL, createPath("[1]", "userid")); Assert.assertEquals(expected, path. replace(new InputSelection(1), new ArrayAccess(1)). replace(new InputSelection(0), new ArrayAccess(0))); }