From 674940ec0a1b4e05799b24a02f89f505ee57252a Mon Sep 17 00:00:00 2001 From: Jonathan Lovelace Date: Sat, 16 Mar 2024 13:29:55 -0400 Subject: [PATCH] TypeStream: Weaken internal declaration of collection type. --- .../src/main/java/lovelace/util/TypeStream.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lovelace-util/src/main/java/lovelace/util/TypeStream.java b/lovelace-util/src/main/java/lovelace/util/TypeStream.java index fa278aade..1360fe86e 100644 --- a/lovelace-util/src/main/java/lovelace/util/TypeStream.java +++ b/lovelace-util/src/main/java/lovelace/util/TypeStream.java @@ -1,14 +1,14 @@ package lovelace.util; import java.util.Arrays; -import java.util.Objects; -import java.util.Set; +import java.util.Collection; import java.util.HashSet; +import java.util.Iterator; import java.util.LinkedList; -import java.util.Queue; import java.util.List; -import java.util.Iterator; import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Queue; /** * A stream of all the types that a given object satisfies. @@ -29,7 +29,7 @@ public Iterator> iterator() { private static class TypeIterator implements Iterator> { private final LinkedList> ourCopy; private final List> cache; - private final Set> classes = new HashSet<>(); + private final Collection> classes = new HashSet<>(); private final Queue> queue = new LinkedList<>(); public TypeIterator(final Object obj, final List> cache) {