com.github.andrewoma.dexx.collection.internal.base
Class AbstractSortedMap<K,V>

java.lang.Object
  extended by com.github.andrewoma.dexx.collection.internal.base.AbstractTraversable<E>
      extended by com.github.andrewoma.dexx.collection.internal.base.AbstractIterable<Pair<K,V>>
          extended by com.github.andrewoma.dexx.collection.internal.base.AbstractMap<K,V>
              extended by com.github.andrewoma.dexx.collection.internal.base.AbstractSortedMap<K,V>
All Implemented Interfaces:
Map<K,V>, SortedMap<K,V>, Traversable<Pair<K,V>>, Iterable<Pair<K,V>>
Direct Known Subclasses:
TreeMap

public abstract class AbstractSortedMap<K,V>
extends AbstractMap<K,V>
implements SortedMap<K,V>


Constructor Summary
AbstractSortedMap()
           
 
Method Summary
 SortedMap<K,V> asSortedMap()
          Returns an immutable view of this map as an instance of java.util.SortedMap.
 SortedMap<K,V> from(K key, boolean inclusive)
          Returns the bottom of the map starting from the key specified.
 SortedMap<K,V> to(K key, boolean inclusive)
          Returns the top of the map up until the key specified.
 
Methods inherited from class com.github.andrewoma.dexx.collection.internal.base.AbstractMap
asMap, equals, hashCode, keys, values
 
Methods inherited from class com.github.andrewoma.dexx.collection.internal.base.AbstractIterable
forEach
 
Methods inherited from class com.github.andrewoma.dexx.collection.internal.base.AbstractTraversable
isEmpty, makeString, makeString, size, to, toArray, toArray, toIndexedList, toSet, toSortedSet, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.github.andrewoma.dexx.collection.SortedMap
comparator, drop, first, last, put, range, remove, take
 
Methods inherited from interface com.github.andrewoma.dexx.collection.Map
asMap, containsKey, get, keys, values
 
Methods inherited from interface com.github.andrewoma.dexx.collection.Iterable
iterator
 
Methods inherited from interface com.github.andrewoma.dexx.collection.Traversable
forEach, isEmpty, makeString, makeString, size, to, toArray, toArray, toIndexedList, toSet, toSortedSet
 

Constructor Detail

AbstractSortedMap

public AbstractSortedMap()
Method Detail

from

@NotNull
public SortedMap<K,V> from(@NotNull
                                   K key,
                                   boolean inclusive)
Description copied from interface: SortedMap
Returns the bottom of the map starting from the key specified.

Specified by:
from in interface SortedMap<K,V>
inclusive - if true, the key will be included in the result, otherwise it will be excluded

to

@NotNull
public SortedMap<K,V> to(@NotNull
                                 K key,
                                 boolean inclusive)
Description copied from interface: SortedMap
Returns the top of the map up until the key specified.

Specified by:
to in interface SortedMap<K,V>
inclusive - if true, the key will be included in the result, otherwise it will be excluded

asSortedMap

@NotNull
public SortedMap<K,V> asSortedMap()
Description copied from interface: SortedMap
Returns an immutable view of this map as an instance of java.util.SortedMap.

Specified by:
asSortedMap in interface SortedMap<K,V>


Copyright © 2014. All Rights Reserved.