Skip to content

Commit

Permalink
TypeStream: Weaken internal declaration of collection type.
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjon3377 committed Mar 16, 2024
1 parent 304fe56 commit 674940e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lovelace-util/src/main/java/lovelace/util/TypeStream.java
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -29,7 +29,7 @@ public Iterator<Class<?>> iterator() {
private static class TypeIterator implements Iterator<Class<?>> {
private final LinkedList<Class<?>> ourCopy;
private final List<Class<?>> cache;
private final Set<Class<?>> classes = new HashSet<>();
private final Collection<Class<?>> classes = new HashSet<>();
private final Queue<Class<?>> queue = new LinkedList<>();

public TypeIterator(final Object obj, final List<Class<?>> cache) {
Expand Down

0 comments on commit 674940e

Please sign in to comment.