common-utils/src/main/java/org/warp/commonutils/type/HashStackSet.java

29 lines
737 B
Java

package org.warp.commonutils.type;
import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet;
import java.util.Collection;
public class HashStackSet<T> extends FastUtilStackSetWrapper<T> {
public HashStackSet() {
super(new ObjectLinkedOpenHashSet<>());
}
public HashStackSet(Collection<T> collection) {
super(new ObjectLinkedOpenHashSet<>(collection));
}
public HashStackSet(AddStrategy addStrategy) {
super(new ObjectLinkedOpenHashSet<>(), addStrategy);
}
private HashStackSet(ObjectLinkedOpenHashSet<T> linkedHashSet, AddStrategy addStrategy) {
super(linkedHashSet, addStrategy);
}
@Override
public HashStackSet<T> clone() {
return new HashStackSet<>(super.linkedHashSet.clone(), super.addStrategy);
}
}