com.qbcps.util.collections.ArraySet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qbcollections Show documentation
Show all versions of qbcollections Show documentation
ListSet classes, a fixed-size round-robin list, and a Trie
package com.qbcps.util.collections;
/*
* File copyright 8/14/13 by Stephen Beitzel
*/
import java.util.ArrayList;
import java.util.Collection;
/**
* Set implementation that preserves the order of items as they are added.
* Backing implementation is an ArrayList and a HashSet
*
* @author Stephen Beitzel <[email protected]>
*/
public class ArraySet extends ListSet {
public ArraySet() {
super();
_list = new ArrayList<>();
}
public ArraySet(Collection objects) {
super();
_list = new ArrayList<>(objects.size());
addAll(objects);
}
}