Class SortedDictionaryBase<K, V>
  
  A base class for implementing a sorted dictionary based on a sorted set collection implementation.
See the source code for C5.TreeDictionary`2 for an example
 
  
  
    Inheritance
    System.Object
    
    
    
    SortedDictionaryBase<K, V>
      
   
  
    Implements
    
    
    
    
    System.Collections.IEnumerable
    
    System.IFormattable
   
  
    Inherited Members
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
   
  
  Assembly: Lucene.Net.dll
  Syntax
  
    public abstract class SortedDictionaryBase<K, V> : DictionaryBase<K, V>, ISortedDictionary<K, V>, IDictionary<K, V>, ICollectionValue<KeyValuePair<K, V>>, IEnumerable<KeyValuePair<K, V>>, IEnumerable, IShowable, IFormattable
   
  Type Parameters
  
  Constructors
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  SortedDictionaryBase(IComparer<K>, IEqualityComparer<K>, MemoryType)
  
  
  Declaration
  
    protected SortedDictionaryBase(IComparer<K> keycomparer, IEqualityComparer<K> keyequalityComparer, MemoryType memoryType = MemoryType.Normal)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.Generic.IComparer<K> | 
        keycomparer | 
         | 
      
      
        | System.Collections.Generic.IEqualityComparer<K> | 
        keyequalityComparer | 
         | 
      
      
        | MemoryType | 
        memoryType | 
        The memory type of the enumerator used to iterate the collection. 
 | 
      
    
  
  Fields
  
  
    |
    Improve this Doc
  
  
    View Source
  
  sortedpairs
  
  
  Declaration
  
    protected ISorted<KeyValuePair<K, V>> sortedpairs
   
  Field Value
  
  Properties
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Comparer
  The key comparer used by this dictionary.
 
  
  Declaration
  
    public IComparer<K> Comparer { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Collections.Generic.IComparer<K> | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Keys
  
  
  Declaration
  
    public ISorted<K> Keys { get; }
   
  Property Value
  
  Methods
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  AddSorted(IEnumerable<KeyValuePair<K, V>>)
  
  
  Declaration
  
    public void AddSorted(IEnumerable<KeyValuePair<K, V>> items)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Collections.Generic.IEnumerable<KeyValuePair<K, V>> | 
        items | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Cut(IComparable<K>, out KeyValuePair<K, V>, out Boolean, out KeyValuePair<K, V>, out Boolean)
  
  
  Declaration
  
    public bool Cut(IComparable<K> cutter, out KeyValuePair<K, V> lowEntry, out bool lowIsValid, out KeyValuePair<K, V> highEntry, out bool highIsValid)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.IComparable<K> | 
        cutter | 
         | 
      
      
        | KeyValuePair<K, V> | 
        lowEntry | 
         | 
      
      
        | System.Boolean | 
        lowIsValid | 
         | 
      
      
        | KeyValuePair<K, V> | 
        highEntry | 
         | 
      
      
        | System.Boolean | 
        highIsValid | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  DeleteMax()
  
  
  Declaration
  
    public KeyValuePair<K, V> DeleteMax()
   
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  DeleteMin()
  
  
  Declaration
  
    public KeyValuePair<K, V> DeleteMin()
   
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  FindMax()
  
  
  Declaration
  
    public KeyValuePair<K, V> FindMax()
   
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  FindMin()
  
  
  Declaration
  
    public KeyValuePair<K, V> FindMin()
   
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Predecessor(K)
  Get the entry in the dictionary whose key is the
predecessor of the specified key.
 
  
  Declaration
  
    public KeyValuePair<K, V> Predecessor(K key)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        key | 
        The key 
 | 
      
    
  
  Returns
  
  Exceptions
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  RangeAll()
  
  
  Declaration
  
    public IDirectedCollectionValue<KeyValuePair<K, V>> RangeAll()
   
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  RangeFrom(K)
  
  
  Declaration
  
    public IDirectedEnumerable<KeyValuePair<K, V>> RangeFrom(K bot)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        bot | 
         | 
      
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  RangeFromTo(K, K)
  
  
  Declaration
  
    public IDirectedEnumerable<KeyValuePair<K, V>> RangeFromTo(K bot, K top)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        bot | 
         | 
      
      
        | K | 
        top | 
         | 
      
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  RangeTo(K)
  
  
  Declaration
  
    public IDirectedEnumerable<KeyValuePair<K, V>> RangeTo(K top)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        top | 
         | 
      
    
  
  Returns
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  RemoveRangeFrom(K)
  
  
  Declaration
  
    public void RemoveRangeFrom(K lowKey)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        lowKey | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  RemoveRangeFromTo(K, K)
  
  
  Declaration
  
    public void RemoveRangeFromTo(K lowKey, K highKey)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        lowKey | 
         | 
      
      
        | K | 
        highKey | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  RemoveRangeTo(K)
  
  
  Declaration
  
    public void RemoveRangeTo(K highKey)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        highKey | 
         | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Show(StringBuilder, ref Int32, IFormatProvider)
  
  
  Declaration
  
    public override bool Show(StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Text.StringBuilder | 
        stringbuilder | 
         | 
      
      
        | System.Int32 | 
        rest | 
         | 
      
      
        | System.IFormatProvider | 
        formatProvider | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
         | 
      
    
  
  Overrides
  Lucene.Net.Support.C5.DictionaryBase<K, V>.Show(System.Text.StringBuilder, System.Int32, System.IFormatProvider)
  
    |
    Improve this Doc
  
  
    View Source
  
  
  Successor(K)
  Get the entry in the dictionary whose key is the
successor of the specified key.
 
  
  Declaration
  
    public KeyValuePair<K, V> Successor(K key)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        key | 
        The key 
 | 
      
    
  
  Returns
  
  Exceptions
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TryPredecessor(K, out KeyValuePair<K, V>)
  Find the entry in the dictionary whose key is the
predecessor of the specified key.
 
  
  Declaration
  
    public bool TryPredecessor(K key, out KeyValuePair<K, V> res)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        key | 
        The key 
 | 
      
      
        | KeyValuePair<K, V> | 
        res | 
        The predecessor, if any 
 | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
        True if key has a predecessor 
 | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TrySuccessor(K, out KeyValuePair<K, V>)
  Find the entry in the dictionary whose key is the
successor of the specified key.
 
  
  Declaration
  
    public bool TrySuccessor(K key, out KeyValuePair<K, V> res)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        key | 
        The key 
 | 
      
      
        | KeyValuePair<K, V> | 
        res | 
        The successor, if any 
 | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
        True if the key has a successor 
 | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TryWeakPredecessor(K, out KeyValuePair<K, V>)
  Find the entry in the dictionary whose key is the
weak predecessor of the specified key.
 
  
  Declaration
  
    public bool TryWeakPredecessor(K key, out KeyValuePair<K, V> res)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        key | 
        The key 
 | 
      
      
        | KeyValuePair<K, V> | 
        res | 
        The predecessor, if any 
 | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
        True if key has a weak predecessor 
 | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  TryWeakSuccessor(K, out KeyValuePair<K, V>)
  Find the entry in the dictionary whose key is the
weak successor of the specified key.
 
  
  Declaration
  
    public bool TryWeakSuccessor(K key, out KeyValuePair<K, V> res)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        key | 
        The key 
 | 
      
      
        | KeyValuePair<K, V> | 
        res | 
        The weak successor, if any 
 | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Boolean | 
        True if the key has a weak successor 
 | 
      
    
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  WeakPredecessor(K)
  Get the entry in the dictionary whose key is the
weak predecessor of the specified key.
 
  
  Declaration
  
    public KeyValuePair<K, V> WeakPredecessor(K key)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        key | 
        The key 
 | 
      
    
  
  Returns
  
  Exceptions
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  WeakSuccessor(K)
  Get the entry in the dictionary whose key is the
weak successor of the specified key.
 
  
  Declaration
  
    public KeyValuePair<K, V> WeakSuccessor(K key)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | K | 
        key | 
        The key 
 | 
      
    
  
  Returns
  
  Exceptions
  
  Implements
  
  
  
  
      System.Collections.Generic.IEnumerable<T>
  
  
      System.Collections.IEnumerable
  
  
  
      System.IFormattable
  
  Extension Methods