aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/intent/model
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-03-29 12:25:00 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2023-03-29 12:34:00 +0200
commit656e755c584897d298fcf95bea5376f1fb1c13f5 (patch)
treea7f7423e01ae62a46c33abbcb6f658d8ef16014c /container-search/src/main/java/com/yahoo/search/intent/model
parent7ac642eefd2be2b52aa0878ad8d926521fe00a20 (diff)
Use CompoundName.from in tests and construction of static objects.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/intent/model')
-rw-r--r--container-search/src/main/java/com/yahoo/search/intent/model/IntentModel.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/intent/model/IntentModel.java b/container-search/src/main/java/com/yahoo/search/intent/model/IntentModel.java
index 9aafd2c4693..0c4b22fbbf2 100644
--- a/container-search/src/main/java/com/yahoo/search/intent/model/IntentModel.java
+++ b/container-search/src/main/java/com/yahoo/search/intent/model/IntentModel.java
@@ -5,7 +5,12 @@ import com.yahoo.search.Query;
import com.yahoo.processing.request.CompoundName;
import com.yahoo.text.interpretation.Interpretation;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
/**
* This is the root node of an intent model.
@@ -19,9 +24,9 @@ import java.util.*;
public class IntentModel extends ParentNode<InterpretationNode> {
/** The name of the property carrying the intent model string: intentModel */
- public static final CompoundName intentModelStringName=new CompoundName("intentModel");
+ public static final CompoundName intentModelStringName = CompoundName.from("intentModel");
/** The name of the property carrying the intent model object: IntentModel */
- public static final CompoundName intentModelObjectName=new CompoundName("IntentModel");
+ public static final CompoundName intentModelObjectName = CompoundName.from("IntentModel");
private static final InterpretationNodeComparator inodeComp = new InterpretationNodeComparator();
@@ -45,7 +50,7 @@ public class IntentModel extends ParentNode<InterpretationNode> {
/** Sort interpretations by descending score order */
public void sortChildren() {
- Collections.sort(children(), inodeComp);
+ children().sort(inodeComp);
}
/**