diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-30 10:04:50 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-30 10:04:50 +0100 |
commit | 448231f18ba53edf5c0e7ab4b6732ef69328281c (patch) | |
tree | 289f528fd6adac2a39e636c449c633c26fdb838e /vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java | |
parent | 711362f17d4bbece0dc2d0833a22063374ae3e04 (diff) |
Reduce the simple usage of guava where java has caught up
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java b/vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java index 1009177761b..61060b700a3 100644 --- a/vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java +++ b/vespajlib/src/main/java/com/yahoo/tensor/functions/Join.java @@ -1,7 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.tensor.functions; -import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; import com.yahoo.tensor.DimensionSizes; import com.yahoo.tensor.IndexedTensor; @@ -15,7 +14,6 @@ import com.yahoo.tensor.evaluation.Name; import com.yahoo.tensor.evaluation.TypeContext; import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -60,7 +58,7 @@ public class Join<NAMETYPE extends Name> extends PrimitiveTensorFunction<NAMETYP public DoubleBinaryOperator combinator() { return combinator; } @Override - public List<TensorFunction<NAMETYPE>> arguments() { return ImmutableList.of(argumentA, argumentB); } + public List<TensorFunction<NAMETYPE>> arguments() { return List.of(argumentA, argumentB); } @Override public TensorFunction<NAMETYPE> withArguments(List<TensorFunction<NAMETYPE>> arguments) { @@ -345,7 +343,7 @@ public class Join<NAMETYPE extends Name> extends PrimitiveTensorFunction<NAMETYP for (Iterator<Tensor.Cell> cellIterator = b.cellIterator(); cellIterator.hasNext(); ) { Tensor.Cell bCell = cellIterator.next(); TensorAddress partialCommonAddress = partialCommonAddress(bCell, bIndexesInCommon); - for (Tensor.Cell aCell : aCellsByCommonAddress.getOrDefault(partialCommonAddress, Collections.emptyList())) { + for (Tensor.Cell aCell : aCellsByCommonAddress.getOrDefault(partialCommonAddress, List.of())) { TensorAddress combinedAddress = joinAddresses(aCell.getKey(), aIndexesInJoined, bCell.getKey(), bIndexesInJoined, joinedType); if (combinedAddress == null) continue; // not combinable |