(common) Deprecate EdgeId and similar

This commit is contained in:
Viktor Lofgren 2023-08-24 11:16:28 +02:00
parent b958acb76a
commit 7bb3e44a76
6 changed files with 7 additions and 1 deletions

View File

@ -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 <T>
*/
@Deprecated
public record EdgeId<T>(int id) {
}

View File

@ -3,6 +3,7 @@ package nu.marginalia.model.id;
import java.util.Arrays;
import java.util.stream.IntStream;
@Deprecated
public record EdgeIdArray<T> (int... values) implements EdgeIdCollection<T> {
public static <T> EdgeIdArray<T> gather(IntStream stream) {

View File

@ -4,6 +4,7 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.stream.IntStream;
@Deprecated
public interface EdgeIdCollection<T> extends Iterable<EdgeId<T>> {
int size();
boolean isEmpty();

View File

@ -2,6 +2,7 @@ package nu.marginalia.model.id;
import gnu.trove.TIntCollection;
@Deprecated
public interface EdgeIdCollectionMutable<T> {
TIntCollection underlyingCollection();

View File

@ -5,6 +5,7 @@ import gnu.trove.list.array.TIntArrayList;
import java.util.stream.IntStream;
@Deprecated
public record EdgeIdList<T> (TIntArrayList list) implements
EdgeIdCollection<T>,
EdgeIdCollectionMutable<T> {

View File

@ -5,6 +5,7 @@ import gnu.trove.set.hash.TIntHashSet;
import java.util.stream.IntStream;
@Deprecated
public record EdgeIdSet<T> (TIntHashSet set) implements EdgeIdCollection<T>, EdgeIdCollectionMutable<T> {
public EdgeIdSet(int... values) {