xtd 0.2.0
Loading...
Searching...
No Matches

◆ contains()

template<typename type_t >
virtual bool xtd::collections::generic::icollection< type_t >::contains ( const type_t &  item) const
pure virtualnoexcept

Determines whether the xtd::collections::generic::icollection <type_t> contains a specific value.

Parameters
itemThe object to locate in the xtd::collections::generic::icollection <type_t>.
Returns
true if item is found in the xtd::collections::generic::icollection <type_t>; otherwise, false.
Remarks
Implementations can vary in how they determine equality of objects; for example, xtd::collections::generic::list <type_t> uses xtd::collections::generic::compoarer <type_t>::default_comparer, whereas xtd::collections::generic::dictionary <key_t, value_t> allows the user to specify the xtd::collections::generic::icompoarer <type_t> implementation to use for comparing keys.

Implemented in xtd::collections::object_model::read_only_collection< type_t >, xtd::basic_array< type_t, allocator_t >, xtd::basic_array< type_t, allocator_t >, and xtd::collections::generic::list< type_t, allocator_t >.