diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-04-20 10:09:24 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2018-04-20 10:09:24 +0200 |
commit | 104295e8ff9230f9bc9e34894d89614aa0f61861 (patch) | |
tree | 0f5cf4fa9824498ef7725ac85ecc46bf650711d8 /searchlib | |
parent | 3ab51064cae4240e24afd4cba7f55c39942127b1 (diff) |
Add back public interface, now deprecated
Diffstat (limited to 'searchlib')
-rwxr-xr-x | searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/ExpressionNode.java | 15 |
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 |