xtd 0.2.0
Loading...
Searching...
No Matches
xtd::collections::generic::extensions::collection_operators< type_t, collection_t > Class Template Reference
Inheritance diagram for xtd::collections::generic::extensions::collection_operators< type_t, collection_t >:
xtd::collections::generic::icollection< bool > xtd::collections::generic::icollection< xtd::collections::generic::key_value_pair< key_t, value_t > > xtd::collections::generic::icollection< list_type_t > xtd::collections::generic::icollection< xtd::sptr< xtd::diagnostics::trace_listener > > xtd::collections::generic::icollection< value_type > xtd::collections::generic::icollection< int32 > xtd::collections::generic::icollection< xtd::string > xtd::collections::generic::icollection< xtd::drawing::color > xtd::collections::generic::icollection< xtd::byte > xtd::collections::generic::icollection< xtd::drawing::imaging::encoder_parameter > xtd::collections::generic::icollection< xtd::basic_string > xtd::collections::generic::icollection< xtd::shared_ptr_object< xtd::forms::menu_item > > xtd::collections::generic::icollection< xtd::forms::style_sheets::shadow > xtd::collections::generic::icollection< byte > xtd::collections::generic::icollection< xtd::uint16 > xtd::collections::generic::icollection< xtd::net::ip_address > xtd::collections::generic::icollection< xtd::array< xtd::byte > > xtd::collections::generic::icollection< xtd::time_zone_info::adjustement_rule > xtd::collections::generic::icollection< xtd::tunit::test >

Definition

template<class type_t, class collection_t>
class xtd::collections::generic::extensions::collection_operators< type_t, collection_t >

Internal collection operators definition.

Definition
template<class type_t, class collection_t>
class collection_operator;
Header
#include <xtd/collections/generic/extensions/collection_operators
Namespace
xtd
Library
xtd.core
Warning
Internal use only for xtd::iequatable interfece.

Public Operators

virtual collection_t & operator<< (const type_t &item)
 The shift left operator adds an item to the xtd::collections::generic::icollection <type_t>.
 
virtual collection_t & operator>> (const type_t &item)
 The shift right operator removes tthe first occurrence of a specific object from the xtd::collections::generic::icollection <type_t>.
 

Member Function Documentation

◆ operator<<()

template<class type_t , class collection_t >
virtual collection_t & xtd::collections::generic::extensions::collection_operators< type_t, collection_t >::operator<< ( const type_t &  item)
inlinevirtual

The shift left operator adds an item to the xtd::collections::generic::icollection <type_t>.

Parameters
itemThe object to add to the xtd::collections::generic::icollection <type_t>.
Exceptions
xtd::not_supported_exceptionThe xtd::collections::generic::icollection <type_t> is read-only.

◆ operator>>()

template<class type_t , class collection_t >
virtual collection_t & xtd::collections::generic::extensions::collection_operators< type_t, collection_t >::operator>> ( const type_t &  item)
inlinevirtual

The shift right operator removes tthe first occurrence of a specific object from the xtd::collections::generic::icollection <type_t>.

Parameters
itemThe object to remove from the xtd::collections::generic::icollection <type_t>.
Exceptions
xtd::not_supported_exceptionThe xtd::collections::generic::icollection <type_t> is read-only.
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.
In collections of contiguous elements, such as lists, the elements that follow the removed element move up to occupy the vacated spot. If the collection is indexed, the indexes of the elements that are moved are also updated. This behavior does not apply to collections where elements are conceptually grouped into buckets, such as a hash table.

The documentation for this class was generated from the following file: