summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/main/java/com/yahoo/tensor/TensorType.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/tensor/TensorType.java')
-rw-r--r--vespajlib/src/main/java/com/yahoo/tensor/TensorType.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/TensorType.java b/vespajlib/src/main/java/com/yahoo/tensor/TensorType.java
index dfbcb06c365..5b23d5d92ae 100644
--- a/vespajlib/src/main/java/com/yahoo/tensor/TensorType.java
+++ b/vespajlib/src/main/java/com/yahoo/tensor/TensorType.java
@@ -1,6 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.tensor;
+import com.google.common.collect.ImmutableList;
import com.yahoo.text.Ascii7BitMatcher;
import java.util.ArrayList;
@@ -85,7 +86,7 @@ public class TensorType {
private final Value valueType;
/** Sorted list of the dimensions of this */
- private final List<Dimension> dimensions;
+ private final ImmutableList<Dimension> dimensions;
private final TensorType mappedSubtype;
@@ -93,7 +94,7 @@ public class TensorType {
this.valueType = valueType;
List<Dimension> dimensionList = new ArrayList<>(dimensions);
Collections.sort(dimensionList);
- this.dimensions = List.copyOf(dimensionList);
+ this.dimensions = ImmutableList.copyOf(dimensionList);
if (dimensionList.stream().allMatch(d -> d.isIndexed()))
mappedSubtype = empty;