class OpenEndRangeMap {

    Collection<V> replaceFrom( K from, V value )
    {
        Collection<V> removed = new ArrayList<>();

        Iterator<V> itr = tree.tailMap( from ).values().iterator();
        while ( itr.hasNext() )
        {
            removed.add( itr.next() );
            itr.remove();
        }

        tree.put( from, value );

        endKey = from;
        endValue = value;

        return removed;
    }

}