31 template<
class type_t,
class collection_t>
32 class collection_common {
39 virtual auto empty() const noexcept ->
bool {
return self().count() == 0;}
43 virtual auto size() const noexcept ->
xtd::
size {
return self().count();}
52 virtual auto operator <<(
const type_t& item) -> collection_t& {
61 self().add(std::move(item));
70 virtual auto operator >>(
const type_t& item) -> collection_t& {
77 auto self() const noexcept -> const collection_t& {
return static_cast<const collection_t&
>(
self_);}
78 auto self() noexcept -> collection_t& {
return static_cast<collection_t&
>(
self_);}
81 collection_common() =
default;
virtual auto operator>>(const type_t &item) -> collection_t &
The shift right operator removes the first occurrence of a specific object from the xtd::collections:...
Definition collection_common.hpp:70
virtual auto empty() const noexcept -> bool
Checks whether the container is empty.
Definition collection_common.hpp:39
virtual auto size() const noexcept -> xtd::size
Gets the number of elements contained in the xtd::collections::generic::icollection <type_t>.
Definition collection_common.hpp:43
virtual auto operator<<(const type_t &item) -> collection_t &
The shift left operator adds an item to the xtd::collections::generic::icollection <type_t>.
Definition collection_common.hpp:52
#define self_
The self_ expression is a reference value expression whose value is the reference of the implicit obj...
Definition self.hpp:20
The xtd::extensions namespace contains interface extensions.
Definition collection_common.hpp:14
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:16
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8