ITree<TKey,TValue> 接口

定义

定义 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 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

受控序列中元素的键组件的类型。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. 此类参数称为“未命名参数” 。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)哈希_多重映射(stl/clr)哈希_集(stl/clr)哈希_多重集(stl/clr)For more information, see hash_map (STL/CLR), hash_multimap (STL/CLR), hash_set (STL/CLR), and hash_multiset (STL/CLR).

属性

Count

获取 ICollection 中包含的元素数。Gets the number of elements contained in the ICollection.

(继承自 ICollection)
IsSynchronized

获取一个值,该值指示是否同步对 ICollection 的访问(线程安全)。Gets a value indicating whether access to the ICollection is synchronized (thread safe).

(继承自 ICollection)
SyncRoot

获取可用于同步对 ICollection 的访问的对象。Gets an object that can be used to synchronize access to the ICollection.

(继承自 ICollection)

方法

begin(ContainerBidirectionalIterator<TValue>)

指定受控序列的开头。Designates the beginning of the controlled sequence.

clear()

从容器中移除所有元素。Removes all elements from the container.

Clone()

创建作为当前实例副本的新对象。Creates a new object that is a copy of the current instance.

(继承自 ICloneable)
CopyTo(Array, Int32)

从特定的 ICollection 索引开始,将 Array 的元素复制到一个 Array 中。Copies the elements of the ICollection to an Array, starting at a particular Array index.

(继承自 ICollection)
count(TKey)

查找与指定键匹配的元素数。Finds the number of elements that match a specified key.

empty()

测试容器中是否不存在元素。Tests whether no elements are present in the container.

end(ContainerBidirectionalIterator<TValue>)

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

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

查找与指定键匹配的范围。Finds the range that matches a specified key.

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

从容器中移除由给定迭代器指定的元素。Removes from the container the element that is specified by the given iterator.

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

从容器中移除指定迭代器之间的元素。Removes from the container the elements between the specified iterators.

erase(TKey)

从容器中移除与指定键匹配的元素。Removes elements from the container that match the specified key.

find(ContainerBidirectionalIterator<TValue>, TKey)

查找与指定键匹配的元素。Finds an element that matches a specified key.

get_generation()

获取基础容器的当前换代。Gets the current change generation of the underlying container.

(继承自 IBidirectionalContainer<TValue>)
GetEnumerator()

返回循环访问集合的枚举数。Returns an enumerator that iterates through a collection.

(继承自 IEnumerable)
insert(ContainerBidirectionalIterator<TValue>, ContainerBidirectionalIterator<TValue>, TValue)

将给定元素添加到容器中。Adds the given element to the container.

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

将给定值添加到容器。Adds the given value to the container.

insert(IEnumerable<TValue>)

将给定的枚举添加到容器。Adds the given enumeration to the container.

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

将给定迭代器指定的元素添加到容器中。Adds to the container the elements specified by the given iterators.

key_comp()

返回用于对受控序列进行排序的排序委托。Returns the ordering delegate that is used to order the controlled sequence. 用于对两个键进行比较。You use it to compare two keys.

lower_bound(ContainerBidirectionalIterator<TValue>, TKey)

查找与指定键匹配的元素范围的开始。Finds the beginning of the range of elements that match a specified key.

rbegin(ReverseBidirectionalIterator<TValue>)

指定反向受控序列的开头。Designates the beginning of the reversed controlled sequence.

rend(ReverseBidirectionalIterator<TValue>)

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

size()

计算容器中的元素数。Counts the number of elements in the container.

swap(ITree<TKey,TValue>)

交换两个容器的内容。Swaps the contents of two containers.

upper_bound(ContainerBidirectionalIterator<TValue>, TKey)

查找与指定键匹配的元素范围的末尾。Finds the end of the range of elements that match a specified key.

value_comp()

返回用于对受控序列进行排序的排序委托。Returns the ordering delegate that is used to order the controlled sequence.

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于