private String quotify(final String value) { return StringQuerySortingModel.normalize(value); } }
private static String normalize(final String s) { return StringQuerySortingModel.normalize(s); }
@SuppressWarnings("unchecked") protected <V> QueryPredicate<T> isPredicate(final V value) { final V normalizedValue = value instanceof String ? (V) normalize((String) value) : value; return ComparisonQueryPredicate.ofIsEqualTo(this, normalizedValue); }
protected QueryPredicate<T> isNotPredicate(final String value) { return ComparisonQueryPredicate.ofIsNotEqualTo(this, normalize(value)); }
private List<String> toSphereNameList(final Iterable<E> args) { return toStream(args) .map(e -> normalize(e.toSphereName())) .collect(toList()); }
@Test public void render() throws Exception { assertThat(ComparisonQueryPredicate.ofIsNotEqualTo(emptyQueryModel, normalize("xyz")).render()).isEqualTo("<>\"xyz\""); } }