class PrimitiveIntCollections {

    public static PrimitiveIntIterator deduplicate( PrimitiveIntIterator source )
    {
        return new PrimitiveIntFilteringIterator( source )
        {
            private final PrimitiveIntSet visited = Primitive.intSet();

            @Override
            public boolean test( int testItem )
            {
                return visited.add( testItem );
            }
        };
    }

    private  PrimitiveIntCollections();

}