summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-04-20 10:09:24 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2018-04-20 10:09:24 +0200
commit104295e8ff9230f9bc9e34894d89614aa0f61861 (patch)
tree0f5cf4fa9824498ef7725ac85ecc46bf650711d8 /searchlib
parent3ab51064cae4240e24afd4cba7f55c39942127b1 (diff)
Add back public interface, now deprecated
Diffstat (limited to 'searchlib')
-rwxr-xr-xsearchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ExpressionNode.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ExpressionNode.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ExpressionNode.java
index c74b90d2ea5..84a428d48be 100755
--- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ExpressionNode.java
+++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ExpressionNode.java
@@ -36,6 +36,7 @@ public abstract class ExpressionNode implements Serializable {
/**
* Returns a script instance of this based on the supplied script functions.
*
+ * @param builder the StringBuilder that will be appended to
* @param context the serialization context
* @param path the call path to this, used for cycle detection, or null if this is a root
* @param parent the parent node of this, or null if it a root
@@ -44,6 +45,20 @@ public abstract class ExpressionNode implements Serializable {
public abstract StringBuilder toString(StringBuilder builder, SerializationContext context, Deque<String> path, CompositeNode parent);
/**
+ * Returns a script instance of this based on the supplied script functions.
+ * @Deprecated, use the faster one that takes and returns a StringBuilder instead.
+ *
+ * @param context the serialization context
+ * @param path the call path to this, used for cycle detection, or null if this is a root
+ * @param parent the parent node of this, or null if it a root
+ * @return the main script, referring to script instances.
+ */
+ @Deprecated
+ public String toString(SerializationContext context, Deque<String> path, CompositeNode parent) {
+ return toString(new StringBuilder(), context, path, parent).toString();
+ }
+
+ /**
* Returns the type this will return if evaluated with the given context.
*
* @param context the variable type bindings to use for this evaluation