IHash<TKey,TValue> IHash<TKey,TValue> IHash<TKey,TValue> IHash<TKey,TValue> Interface

定義

定義 STL/CLR hash_maphash_multimaphash_sethash_multiset 物件的介面。Defines the interface of the STL/CLR hash_map, hash_multimap, hash_set, and hash_multiset objects.

generic <typename TKey, typename TValue>
public interface class IHash : ICloneable, Microsoft::VisualC::StlClr::Generic::IBidirectionalContainer<TValue>, System::Collections::ICollection
public interface IHash<TKey,TValue> : ICloneable, Microsoft.VisualC.StlClr.Generic.IBidirectionalContainer<TValue>, System.Collections.ICollection
type IHash<'Key, 'Value> = interface
    interface IBidirectionalContainer<'Value>
    interface ICloneable
    interface ICollection
    interface IEnumerable
Public Interface IHash(Of TKey, TValue)
Implements IBidirectionalContainer(Of TValue), ICloneable, ICollection

類型參數

TKey

受控制序列中項目的主要元件型別。The type of the key component of an element in the controlled sequence.

TValue

受控制序列中項目的實值元件型別。The type of the value component of an element in the controlled sequence.

實作

備註

某些方法 (特別是運算子) 會宣告參數的類型,但不會指定參數名稱。Some methods, especially operators, declare a type for a parameter but do not specify a parameter name. 這種參數稱為「未命名參數」 (Unnamed Parameter)。Such a parameter is known as an unnamed parameter. 在這些方法的文件中, __unnamed0 預留位置代表未命名的參數。In the documentation for these methods, the __unnamed0 placeholder represents the unnamed parameter.

如需詳細資訊,請參閱 < 雜湊_地圖 (STL/CLR)雜湊_multimap (STL/CLR)雜湊_設定 (STL/CLR),以及雜湊_multiset (STL/CLR)For more information, see hash_map (STL/CLR), hash_multimap (STL/CLR), hash_set (STL/CLR), and hash_multiset (STL/CLR).

方法

begin(ContainerBidirectionalIterator<TValue>) begin(ContainerBidirectionalIterator<TValue>) begin(ContainerBidirectionalIterator<TValue>) begin(ContainerBidirectionalIterator<TValue>)

指定受控制序列的開頭。Designates the beginning of the controlled sequence.

bucket_count() bucket_count() bucket_count() bucket_count()

計數雜湊資料表中 Bucket 的數目。Counts the number of buckets in the hash table.

clear() clear() clear() clear()

移除容器中的所有項目。Removes all elements from the container.

Clone() Clone() Clone() Clone()

建立目前執行個體複本的新物件。Creates a new object that is a copy of the current instance.

(Inherited from ICloneable)
CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

從特定的 ICollection 索引開始,將 Array 的項目複製到 ArrayCopies the elements of the ICollection to an Array, starting at a particular Array index.

(Inherited from ICollection)
count(TKey) count(TKey) count(TKey) count(TKey)

尋找符合指定索引鍵的項目數目。Finds the number of elements that match a specified key.

empty() empty() empty() empty()

測試容器中是否沒有項目存在。Tests whether no elements are present in the container.

end(ContainerBidirectionalIterator<TValue>) end(ContainerBidirectionalIterator<TValue>) end(ContainerBidirectionalIterator<TValue>) end(ContainerBidirectionalIterator<TValue>)

指定受控制序列的結尾。Designates the end of the controlled sequence.

equal_range(GenericPair<ContainerBidirectionalIterator<TValue>,ContainerBidirectionalIterator<TValue>>, TKey) equal_range(GenericPair<ContainerBidirectionalIterator<TValue>,ContainerBidirectionalIterator<TValue>>, TKey) equal_range(GenericPair<ContainerBidirectionalIterator<TValue>,ContainerBidirectionalIterator<TValue>>, TKey) equal_range(GenericPair<ContainerBidirectionalIterator<TValue>,ContainerBidirectionalIterator<TValue>>, TKey)

尋找符合指定之索引鍵的範圍。Finds the range that matches a specified key.

erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>) erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>) erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>) erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>)

從容器移除由指定之 Iterator 所指定的項目。Removes from the container the element that is specified by the given iterator.

erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>) erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>) erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>) erase(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>)

從容器移除指定之 Iterator 之間的項目。Removes from the container the elements between the specified iterators.

erase(TKey) erase(TKey) erase(TKey) erase(TKey)

從容器移除符合指定之索引鍵的項目。Removes elements from the container that match the specified key.

find(ContainerBidirectionalIterator<TValue>, TKey) find(ContainerBidirectionalIterator<TValue>, TKey) find(ContainerBidirectionalIterator<TValue>, TKey) find(ContainerBidirectionalIterator<TValue>, TKey)

尋找符合指定之索引鍵的元素。Finds an element that matches a specified key.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

傳回逐一查看集合的列舉值。Returns an enumerator that iterates through a collection.

(Inherited from IEnumerable)
get_generation() get_generation() get_generation() get_generation()

取得基礎容器的目前變化層代 (Generation)。Gets the current change generation of the underlying container.

(Inherited from IBidirectionalContainer<TValue>)
hash_delegate() hash_delegate() hash_delegate() hash_delegate()

傳回用於將索引鍵值轉換成整數的委派。Returns the delegate that is used to convert a key value to an integer.

insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue) insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue) insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue) insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue)

將指定的項目新增至容器。Adds the given element to the container.

insert(GenericPair<ContainerBidirectionalIterator<TValue>,Boolean>, TValue) insert(GenericPair<ContainerBidirectionalIterator<TValue>,Boolean>, TValue) insert(GenericPair<ContainerBidirectionalIterator<TValue>,Boolean>, TValue) insert(GenericPair<ContainerBidirectionalIterator<TValue>,Boolean>, TValue)

將指定的值新增至容器。Adds the given value to the container.

insert(IEnumerable) insert(IEnumerable) insert(IEnumerable) insert(IEnumerable)

將指定的列舉新增至容器。Adds the given enumeration to the container.

insert(IInputIterator<TValue>, IInputIterator<TValue>) insert(IInputIterator<TValue>, IInputIterator<TValue>) insert(IInputIterator<TValue>, IInputIterator<TValue>) insert(IInputIterator<TValue>, IInputIterator<TValue>)

將指定之 Iterator 所指定的項目新增至容器。Adds to the container the elements specified by the given iterators.

key_comp() key_comp() key_comp() key_comp()

傳回用於排序受控制序列的順序委派。Returns the ordering delegate that is used to order the controlled sequence. 您會用它來比較兩個索引鍵。You use it to compare two keys.

load_factor() load_factor() load_factor() load_factor()

計數雜湊資料表中各 Bucket 之項目的平均數目。Counts the average number of elements per bucket in the hash table.

lower_bound(ContainerBidirectionalIterator<TValue>, TKey) lower_bound(ContainerBidirectionalIterator<TValue>, TKey) lower_bound(ContainerBidirectionalIterator<TValue>, TKey) lower_bound(ContainerBidirectionalIterator<TValue>, TKey)

尋找符合指定索引鍵之項目範圍的開頭。Finds the beginning of the range of elements that match a specified key.

max_load_factor() max_load_factor() max_load_factor() max_load_factor()

取得雜湊資料表中各 Bucket 的最大項目數目。Gets the maximum number of elements per bucket in the hash table.

max_load_factor(Single) max_load_factor(Single) max_load_factor(Single) max_load_factor(Single)

設定雜湊資料表中各 Bucket 的最大項目數目。Sets the maximum number of elements per bucket in the hash table.

rbegin(ReverseBidirectionalIterator<TValue>) rbegin(ReverseBidirectionalIterator<TValue>) rbegin(ReverseBidirectionalIterator<TValue>) rbegin(ReverseBidirectionalIterator<TValue>)

指定反向受控制序列的開頭。Designates the beginning of the reversed controlled sequence.

rehash(Int32) rehash(Int32) rehash(Int32) rehash(Int32)

重建雜湊資料表。Rebuilds the hash table.

rend(ReverseBidirectionalIterator<TValue>) rend(ReverseBidirectionalIterator<TValue>) rend(ReverseBidirectionalIterator<TValue>) rend(ReverseBidirectionalIterator<TValue>)

指定反向受控制序列的結尾。Designates the end of the reversed controlled sequence.

size() size() size() size()

計算容器中的項目數目。Counts the number of elements in the container.

swap(IHash<TKey,TValue>) swap(IHash<TKey,TValue>) swap(IHash<TKey,TValue>) swap(IHash<TKey,TValue>)

交換兩個容器的內容。Swaps the contents of two containers.

upper_bound(ContainerBidirectionalIterator<TValue>, TKey) upper_bound(ContainerBidirectionalIterator<TValue>, TKey) upper_bound(ContainerBidirectionalIterator<TValue>, TKey) upper_bound(ContainerBidirectionalIterator<TValue>, TKey)

尋找符合指定索引鍵之項目範圍的結尾。Finds the end of the range of elements that match a specified key.

value_comp() value_comp() value_comp() value_comp()

傳回用於排序受控制序列的順序委派。Returns the ordering delegate that is used to order the controlled sequence.

屬性

Count Count Count Count

取得 ICollection 中所包含的項目數。Gets the number of elements contained in the ICollection.

(Inherited from ICollection)
IsSynchronized IsSynchronized IsSynchronized IsSynchronized

取得值,這個值表示對 ICollection 的存取是否同步 (安全執行緒)。Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(Inherited from ICollection)
SyncRoot SyncRoot SyncRoot SyncRoot

取得可用以同步存取 ICollection 的物件。Gets an object that can be used to synchronize access to the ICollection.

(Inherited from ICollection)

擴充方法

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

適用於