MCPcopy
hub / github.com/OpenTSDB/opentsdb / writeStringField

Method writeStringField

src/query/expression/ExpressionTree.java:195–212  ·  view source on GitHub ↗

Helper to create the original expression (or at least a nested expression without the parameters included) @return A string representing the full expression.

()

Source from the content-addressed store, hash-verified

193 * @return A string representing the full expression.
194 */
195 public String writeStringField() {
196 final List<String> strs = Lists.newArrayList();
197 if (sub_expressions != null) {
198 for (ExpressionTree sub : sub_expressions) {
199 strs.add(sub.toString());
200 }
201 }
202
203 if (sub_metric_queries != null) {
204 final String sub_metrics = clean(sub_metric_queries.values());
205 if (sub_metrics != null && sub_metrics.length() > 0) {
206 strs.add(sub_metrics);
207 }
208 }
209
210 final String inner_expression = DOUBLE_COMMA_JOINER.join(strs);
211 return expression.writeStringField(func_params, inner_expression);
212 }
213
214 /**
215 * Helper to clean out some characters

Callers 1

toStringMethod · 0.95

Calls 5

cleanMethod · 0.95
valuesMethod · 0.65
writeStringFieldMethod · 0.65
addMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected