Skip to content

Commit

Permalink
Use LinkHashSet to maintain set order
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdgr8 committed Sep 14, 2021
1 parent c744b07 commit f49aced
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;

Expand Down Expand Up @@ -94,7 +94,7 @@ public boolean remove(O object) {
protected abstract void removeObjectFromMap(O object);

public class Collection {
private final Set<O> mObjects = new HashSet<>();
private final Set<O> mObjects = new LinkedHashSet<>();

public Collection() {
}
Expand Down

0 comments on commit f49aced

Please sign in to comment.