Class CharArrayMap<TValue>
A simple class that stores key System.Strings as char[]'s in a hash table. Note that this is not a general purpose class. For example, it cannot remove items from the map, nor does it resize its hash table to be smaller, etc. It is designed to be quick to retrieve items by char[] keys without the necessity of converting to a System.String first.
You must specify the required LuceneVersion compatibility when creating CharArrayMap:
- As of 3.1, supplementary characters are properly lowercased.
Inheritance
Inherited Members
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
[Serializable]
public class CharArrayMap<TValue> : ICharArrayMap, IDictionary<string, TValue>, ICollection<KeyValuePair<string, TValue>>, IEnumerable<KeyValuePair<string, TValue>>, IEnumerable
Type Parameters
Name | Description |
---|---|
TValue |
Constructors
Name | Description |
---|---|
CharArrayMap(LuceneVersion, IDictionary<String, TValue>, Boolean) | Creates a map from the mappings in another map. |
CharArrayMap(LuceneVersion, Int32, Boolean) | Create map with enough capacity to hold |
Properties
Name | Description |
---|---|
Count | Gets the number of key/value pairs contained in the CharArrayMap<TValue>. |
IsReadOnly |
|
Item[ICharSequence] | Gets or sets the value associated with the specified key. |
Item[Char[]] | Gets or sets the value associated with the specified key. |
Item[Char[], Int32, Int32] | Gets or sets the value associated with the specified key. |
Item[Object] | Gets or sets the value associated with the specified key. |
Item[String] | Gets or sets the value associated with the specified key. |
Keys | Gets a collection containing the keys in the CharArrayMap<TValue>. |
MatchVersion | The Lucene version corresponding to the compatibility behavior that this instance emulates |
Values | Gets a collection containing the values in the CharArrayMap<TValue>. This specialized collection can be enumerated in order to read its values and overrides System.Object.ToString() in order to display a string representation of the values. |
Methods
Name | Description |
---|---|
Add(KeyValuePair<String, TValue>) | Adds the |
Add(String, TValue) | Adds the |
Clear() | Clears all entries in this map. This method is supported for reusing, but not System.Collections.Generic.IDictionary<TKey, TValue>.Remove(TKey). |
ContainsKey(ICharSequence) |
|
ContainsKey(Char[]) |
|
ContainsKey(Char[], Int32, Int32) |
|
ContainsKey(Object) |
|
ContainsKey(String) |
|
CopyTo(CharArrayMap<TValue>) | Copies all items in the current CharArrayMap<TValue> to the passed in CharArrayMap<TValue>. |
CopyTo(KeyValuePair<String, TValue>[], Int32) | Copies all items in the current dictionary the |
EmptyMap() | Returns an empty, unmodifiable map. |
EntrySet() | |
Equals(Object) | LUCENENET Specific - test for value equality similar to how it is done in Java |
Get(ICharSequence) | returns the value of the mapping of the chars inside this ICharSequence |
Get(Char[]) | returns the value of the mapping of the chars inside this |
Get(Char[], Int32, Int32) | returns the value of the mapping of |
Get(Object) | returns the value of the mapping of the chars inside this System.Object.ToString() |
Get(String) | returns the value of the mapping of the chars inside this System.String |
GetEnumerator() | Returns an enumerator that iterates through the CharArrayMap<TValue>. |
GetHashCode() | LUCENENET Specific - override required by .NET because we override Equals to simulate Java's value equality checking. |
Put(ICharSequence) | Adds a placeholder with the given |
Put(ICharSequence, TValue) | Add the given mapping. |
Put(Char[]) | Adds a placeholder with the given |
Put(Char[], TValue) | Add the given mapping. If ignoreCase is true for this Set, the text array will be directly modified. The user should never modify this text array after calling this method. |
Put(Object) | Adds a placeholder with the given |
Put(Object, TValue) | Add the given mapping using the System.Object.ToString() representation
of |
Put(String) | Adds a placeholder with the given |
Put(String, TValue) | Add the given mapping. |
PutAll(IDictionary<ICharSequence, TValue>) | This implementation enumerates over the specified IDictionary{ICharSequence,TValue}'s entries, and calls this map's Put(ICharSequence, TValue) operation once for each entry. |
PutAll(IDictionary<Char[], TValue>) | This implementation enumerates over the specified IDictionary{char[],TValue}'s entries, and calls this map's Put(Char[], TValue) operation once for each entry. |
PutAll(IDictionary<Object, TValue>) | This implementation enumerates over the specified IDictionary{object,TValue}'s entries, and calls this map's Put(Object, TValue) operation once for each entry. |
PutAll(IDictionary<String, TValue>) | This implementation enumerates over the specified IDictionary{string,TValue}'s entries, and calls this map's Put(String, TValue) operation once for each entry. |
PutAll(IEnumerable<KeyValuePair<ICharSequence, TValue>>) | This implementation enumerates over the specified IEnumerable{KeyValuePair{ICharSequence,TValue}}'s entries, and calls this map's Put(ICharSequence, TValue) operation once for each entry. |
PutAll(IEnumerable<KeyValuePair<Char[], TValue>>) | This implementation enumerates over the specified IEnumerable{KeyValuePair{char[],TValue}}'s entries, and calls this map's Put(Char[], TValue) operation once for each entry. |
PutAll(IEnumerable<KeyValuePair<Object, TValue>>) | This implementation enumerates over the specified IEnumerable{KeyValuePair{object,TValue}}'s entries, and calls this map's Put(Object, TValue) operation once for each entry. |
PutAll(IEnumerable<KeyValuePair<String, TValue>>) | This implementation enumerates over the specified IEnumerable{KeyValuePair{string,TValue}}'s entries, and calls this map's Put(String, TValue) operation once for each entry. |
ToString() | Returns a string that represents the current object. (Inherited from System.Object.) |
TryGetValue(ICharSequence, out TValue) | Gets the value associated with the specified key. |
TryGetValue(Char[], out TValue) | Gets the value associated with the specified key. |
TryGetValue(Char[], Int32, Int32, out TValue) | Gets the value associated with the specified key. |
TryGetValue(Object, out TValue) | Gets the value associated with the specified key. |
TryGetValue(String, out TValue) | Gets the value associated with the specified key. |
Explicit Interface Implementations
Name | Description |
---|---|
IEnumerable.GetEnumerator() | Returns an enumerator that iterates through the CharArrayMap<TValue>. |