語言

ITree<TKey,TValue> 介面

定義

定義 STL/CLRhash_map、、hash_multimap、 hash_sethash_multiset 與物件的介面。

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

類型參數

TKey

受控制序列中專案之索引鍵元件的型別。

TValue

受控序列中元素的值成分型別。

實作

備註

有些方法,特別是運算子,會宣告參數的型別,但不指定參數名稱。 這樣的參數稱為 無名參數。 在這些方法的文件中, A_0 佔位符代表未命名的參數。

更多資訊請參閱hash_map(STL/CLR)、hash_multimap(STL/CLR)、hash_set(STL/CLR)及hash_multiset(STL/CLR)。

屬性

名稱 Description
Count

得到包含於 的 ICollection元素數量。

(繼承來源 ICollection)
IsSynchronized

取得值,指出是否同步存取 ICollection (線程安全)。

(繼承來源 ICollection)
SyncRoot

取得一個物件,可用來同步存取 ICollection。

(繼承來源 ICollection)

方法

名稱 Description
begin(ContainerBidirectionalIterator<TValue>)

指定受控制序列的開頭。

clear()

移除容器中的所有元素。

Clone()

建立一個新的物件,該物件是目前實例的複製品。

(繼承來源 ICloneable)
CopyTo(Array, Int32)

從特定ICollection索引開始,將 的Array元素複製到 Array。

(繼承來源 ICollection)
count(TKey)

找出與指定鍵數相符的元素數量。

empty()

測試容器中是否存在任何元素。

end(ContainerBidirectionalIterator<TValue>)

指定受控制序列的結尾。

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

找到與指定金鑰相符的範圍。

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

從容器中移除指定迭代器之間的元素。

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

從容器中移除由給定迭代器指定的元素。

erase(TKey)

移除容器中與指定鍵符相符的元素。

find(ContainerBidirectionalIterator<TValue>, TKey)

尋找符合指定之索引鍵的元素。

get_generation()

取得底層容器目前的變更產生。

(繼承來源 IBidirectionalContainer<TValue>)
GetEnumerator()

傳回逐一查看集合的列舉值。

(繼承來源 IEnumerable)
insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue)

將給定元素加入容器中。

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

將指定的值加到容器上。

insert(IEnumerable<TValue>)

將給定的枚舉加入容器。

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

將給定迭代子指定的元素加入容器。

key_comp()

回傳用於排序受控序列的排序代理。 您可以使用它來比較兩個索引鍵。

lower_bound(ContainerBidirectionalIterator<TValue>, TKey)

尋找與指定調符相符元素範圍的起始點。

rbegin(ReverseBidirectionalIterator<TValue>)

指定反向受控制序列的開頭。

rend(ReverseBidirectionalIterator<TValue>)

指定反向受控制序列的結尾。

size()

計算容器中元素的數量。

swap(ITree<TKey,TValue>)

交換兩個容器的內容。

upper_bound(ContainerBidirectionalIterator<TValue>, TKey)

尋找與指定鍵匹配元素範圍的末端。

value_comp()

回傳用於排序受控序列的排序代理。

擴充方法

名稱 Description
AsParallel(IEnumerable)

啟用查詢的平行處理。

AsQueryable(IEnumerable)

將 IEnumerable 轉換成 IQueryable。

Cast<TResult>(IEnumerable)

將 IEnumerable 的項目轉換成指定的型別。

OfType<TResult>(IEnumerable)

根據指定的型別篩選 IEnumerable 的專案。

適用於