/*
 * @author Ranides Atterwim <ranides@gmail.com>
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */
package net.ranides.assira.collection.maps;

import java.util.Map;
import java.util.SortedMap;
import net.ranides.assira.collection.IntComparator;
import net.ranides.assira.collection.sets.ASortedSet;
import net.ranides.assira.collection.sets.IntSortedSet;

/**
 *
 * @author Ranides Atterwim <ranides@gmail.com>
 */
public interface IntSortedMap<V> extends IntMap<V>, SortedMap<Integer, V> {

    @Override
    IntComparator comparator();

    @Override
    ASortedSet<Map.Entry<Integer, V>> entrySet();

    /**
     * Returns a type-specific sorted-set view of the mappings contained in this
     * map. Note that this specification strengthens the one given in the
     * corresponding type-specific unsorted map.
     *
     * @return a type-specific sorted-set view of the mappings contained in this
     * map.
     * @see #entrySet()
     */
    @Override
    ASortedSet<IntMap.IntEntry<V>> fastEntrySet();

    /**
     * @see SortedMap#firstKey()
     */
    int firstIntKey();

    /**
     * Returns a view of the portion of this sorted map whose keys are strictly
     * less than <code>toKey</code>.
     *
     * @see SortedMap#headMap(Object)
     */
    IntSortedMap<V> headMap(int end);

    @Override
    IntSortedMap<V> headMap(Integer end);

    @Override
    IntSortedSet keySet();

    /**
     * @see SortedMap#lastKey()
     */
    int lastIntKey();

    @Override
    Integer lastKey();

    /**
     * Returns a view of the portion of this sorted map whose keys range from
     * <code>fromKey</code>, inclusive, to <code>toKey</code>, exclusive.
     *
     * @see SortedMap#subMap(Object,Object)
     */
    IntSortedMap<V> subMap(int begin, int end);

    @Override
    IntSortedMap<V> subMap(Integer begin, Integer end);

    /**
     * Returns a view of the portion of this sorted map whose keys are greater
     * than or equal to <code>fromKey</code>.
     *
     * @see SortedMap#tailMap(Object)
     */
    IntSortedMap<V> tailMap(int begin);

    @Override
    IntSortedMap<V> tailMap(Integer begin);
    
}
