From 7bb3e44a769038a63a1810b5fb8fabe679157182 Mon Sep 17 00:00:00 2001 From: Viktor Lofgren Date: Thu, 24 Aug 2023 11:16:28 +0200 Subject: [PATCH] (common) Deprecate EdgeId and similar --- .../model/src/main/java/nu/marginalia/model/id/EdgeId.java | 3 ++- .../src/main/java/nu/marginalia/model/id/EdgeIdArray.java | 1 + .../src/main/java/nu/marginalia/model/id/EdgeIdCollection.java | 1 + .../java/nu/marginalia/model/id/EdgeIdCollectionMutable.java | 1 + .../model/src/main/java/nu/marginalia/model/id/EdgeIdList.java | 1 + .../model/src/main/java/nu/marginalia/model/id/EdgeIdSet.java | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeId.java b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeId.java index 9e45c78f..906a0fd9 100644 --- a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeId.java +++ b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeId.java @@ -3,8 +3,9 @@ package nu.marginalia.model.id; /** * This exists entirely for strengthening the typing of IDs - * + * Deprecated: We dont' use this anymore * @param */ +@Deprecated public record EdgeId(int id) { } diff --git a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdArray.java b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdArray.java index 078dcdb6..91c84aba 100644 --- a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdArray.java +++ b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdArray.java @@ -3,6 +3,7 @@ package nu.marginalia.model.id; import java.util.Arrays; import java.util.stream.IntStream; +@Deprecated public record EdgeIdArray (int... values) implements EdgeIdCollection { public static EdgeIdArray gather(IntStream stream) { diff --git a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdCollection.java b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdCollection.java index 47cb4c62..0cf7997a 100644 --- a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdCollection.java +++ b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdCollection.java @@ -4,6 +4,7 @@ import java.util.Arrays; import java.util.Iterator; import java.util.stream.IntStream; +@Deprecated public interface EdgeIdCollection extends Iterable> { int size(); boolean isEmpty(); diff --git a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdCollectionMutable.java b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdCollectionMutable.java index 0056cb28..d9f546eb 100644 --- a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdCollectionMutable.java +++ b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdCollectionMutable.java @@ -2,6 +2,7 @@ package nu.marginalia.model.id; import gnu.trove.TIntCollection; +@Deprecated public interface EdgeIdCollectionMutable { TIntCollection underlyingCollection(); diff --git a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdList.java b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdList.java index 98f651d1..f18485ba 100644 --- a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdList.java +++ b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdList.java @@ -5,6 +5,7 @@ import gnu.trove.list.array.TIntArrayList; import java.util.stream.IntStream; +@Deprecated public record EdgeIdList (TIntArrayList list) implements EdgeIdCollection, EdgeIdCollectionMutable { diff --git a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdSet.java b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdSet.java index 5119b5c7..7b52af75 100644 --- a/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdSet.java +++ b/code/common/model/src/main/java/nu/marginalia/model/id/EdgeIdSet.java @@ -5,6 +5,7 @@ import gnu.trove.set.hash.TIntHashSet; import java.util.stream.IntStream; +@Deprecated public record EdgeIdSet (TIntHashSet set) implements EdgeIdCollection, EdgeIdCollectionMutable { public EdgeIdSet(int... values) {