Skip to content

Instantly share code, notes, and snippets.

View bemusementpark's full-sized avatar

Andrew bemusementpark

View GitHub Profile
@jarrodhroberson
jarrodhroberson / InsertionOrderSet.java
Created November 1, 2011 17:55
Sorted Set implementation that preserves insertion order like a List does
import java.util.*;
public class InsertionOrderSet<E> implements SortedSet<E>
{
private final SortedSet<IndexedEntry<E>> bs;
public InsertionOrderSet(final E[] e)
{
this(Arrays.asList(e));
}