@Test public void configString() { WithoutTagAggregationClause clause = new WithoutTagAggregationClause(Arrays.asList("foo", "bar", "bar", "bar", "1")); assertEquals("without ('1', bar, foo)", clause.configString().toString()); }
@Override public StringBuilder configString() { StringBuilder result = new StringBuilder("without ("); tags.stream().sorted().forEachOrdered(tag -> result.append(maybeQuoteIdentifier(tag)).append(", ")); result.replace(result.length() - 2, result.length(), ")"); return result; }
WithoutTagAggregationClause implements TagAggregationClause { @Override public StringBuilder configString() { StringBuilder result = new StringBuilder("without ("); tags.stream().sorted().forEachOrdered(tag -> result.append(maybeQuoteIdentifier(tag)).append(", ")); result.replace(result.length() - 2, result.length(), ")"); return result; } }
WithoutTagAggregationClause implements TagAggregationClause { @Override public StringBuilder configString() { StringBuilder result = new StringBuilder("without ("); tags.stream().sorted().forEachOrdered(tag -> result.append(maybeQuoteIdentifier(tag)).append(", ")); result.replace(result.length() - 2, result.length(), ")"); return result; } WithoutTagAggregationClause(Collection<String> tags); }
WithoutTagAggregationClause implements TagAggregationClause { @Override public StringBuilder configString() { StringBuilder result = new StringBuilder("without ("); tags.stream().sorted().forEachOrdered(tag -> result.append(maybeQuoteIdentifier(tag)).append(", ")); result.replace(result.length() - 2, result.length(), ")"); return result; } WithoutTagAggregationClause(Collection<String> tags); @Override boolean isScalar(); @Override Map<Tags, Collection<R>> apply(Stream<X> x_stream, Function<? super X, Tags> x_tag_fn, Function<? super X, R> x_map_fn); @Override Map<Tags, Collection<R>> apply(Stream<X> x_stream, Stream<Y> y_stream,
            Function<? super X, Tags> x_tag_fn, Function<? super Y, Tags> y_tag_fn,
            Function<? super X, R> x_map_fn, Function<? super Y, R> y_map_fn); @Override StringBuilder configString(); }
WithoutTagAggregationClause implements TagAggregationClause { @Override public StringBuilder configString() { StringBuilder result = new StringBuilder("without ("); tags.stream().sorted().forEachOrdered(tag -> result.append(maybeQuoteIdentifier(tag)).append(", ")); result.replace(result.length() - 2, result.length(), ")"); return result; } WithoutTagAggregationClause(Collection<String> tags); @Override boolean isScalar(); @Override Map<Tags, Collection<R>> apply(Stream<X> x_stream, Function<? super X, Tags> x_tag_fn, Function<? super X, R> x_map_fn); @Override Map<Tags, Collection<R>> apply(Stream<X> x_stream, Stream<Y> y_stream,
            Function<? super X, Tags> x_tag_fn, Function<? super Y, Tags> y_tag_fn,
            Function<? super X, R> x_map_fn, Function<? super Y, R> y_map_fn); @Override StringBuilder configString();  }