Represents a first-in, first-out collection of objects.
Public Aliases | |
| using | value_type |
| Represents the list value type. | |
| using | base_type |
| Represents the list base type. | |
| using | size_type |
| Represents the list size type (usually xtd::size). | |
| using | reference |
| Represents the reference of list value type. | |
| using | const_reference |
| Represents the const reference of list value type. | |
Public Constructors | |
| queue ()=default | |
| Initializes a new instance of the xtd::collections::generic::queue <type_t> class that is empty and has the default initial capacity. | |
| queue (queue &&queue)=default | |
| Move constructor with specified queue. | |
| queue (const queue &queue)=default | |
| Default copy constructor with specified queue. | |
| queue (std::queue< type_t > &&queue) | |
| Move constructor with specified queue. | |
| queue (const std::queue< type_t > &queue) | |
| Default copy constructor with specified queue. | |
| queue (const ienumerable< value_type > &collection) | |
| Initializes a new instance of the xtd::collections::generic::queue <type_t> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied. | |
| queue (size_type capacity) | |
| Initializes a new instance of the xtd::collections::generic::queue <type_t> class that is empty and has the specified initial capacity. | |
| queue (std::initializer_list< type_t > il) | |
| Constructs the container with the contents of the specified initializer list, and allocator. | |
| template<std::input_iterator input_iterator_t> | |
| queue (input_iterator_t first, input_iterator_t last) | |
| Constructs the container with the contents of the range [first, last). | |
Public Properties | |
| auto | capacity () const noexcept -> size_type |
| Gets the total numbers of elements the internal data structure can hold without resizing. | |
| auto | count () const noexcept -> size_type override |
| Gets the number of nodes actually contained in the xtd::collections::generic::queue <type_t>. | |
| std::queue< type_t > | items () const |
| Gets a std::queue<type_t>. | |
Public Methods | |
| auto | clear () -> void override |
| Removes all elements from the xtd::collections::generic::queue <type_t>. | |
| auto | contains (const_reference value) const noexcept -> bool override |
| Determines whether an element is in the xtd::collections::generic::queue <type_t>. | |
| auto | copy_to (xtd::array< type_t > &array, size_type array_index) const -> void override |
| Copies the entire xtd::colllections::generic::linked_list <type_t> to a compatible one-dimensional array, starting at the specified index of the target array. | |
| auto | dequeue () -> value_type |
| Removes and returns the object at the beginning of the xtd::collections::generic::queue <type_t>. | |
| auto | enqueue (const_reference value) -> void |
| Adds an object to the end of the xtd::collections::generic::queue <type_t>. | |
| auto | ensure_capacity (size_type capacity) -> size_type |
Ensures that the capacity of this queue is at least the specified capacity. If the current capacity is less than capacity, it is increased to at least the specified capacity. | |
| enumerator< value_type > | get_enumerator () const noexcept override |
| Returns an enumerator that iterates through the xtd::collections::generic::queue <type_t>. | |
| auto | peek () const -> value_type |
| Returns the object at the beginning of the xtd::collections::generic::queue <type_t> without removing it. | |
| auto | to_array () const -> xtd::array< value_type > |
| Copies the xtd::collections::generic::queue <type_t> elements to a new array. | |
| auto | to_string () const noexcept -> string override |
| Returns a xtd::string that represents the current object. | |
| auto | trim_excess () -> void |
| Sets the capacity to the actual number of elements in the xtd::collections::generic::queue <type_t>, if that number is less than 90 percent of current capacity. | |
| auto | trim_excess (size_type capacity) -> void |
| Sets the capacity of a xtd::collections::generic::queue <type_t> object to the specified number of entries. | |
| auto | try_dequeue (value_type &result) noexcept -> bool |
| Removes the object at the beginning of the xtd::collections::generic::queue <type_t>, and copies it to the result parameter. | |
| auto | try_peek (value_type &result) const noexcept -> bool |
| Returns a value that indicates whether there is an object at the beginning of the xtd::collections::generic::queue <type_t>, and if one is present, copies it to the result parameter. The object is not removed from the xtd::collections::generic::queue <type_t>. | |
Public Operators | |
| operator std::queue< type_t > () const | |
| Gets a std::queue<type_t>. | |
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. | |
| virtual xtd::size | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. | |
| virtual type_object | get_type () const noexcept |
| Gets the type of the current instance. | |
| template<class object_t> | |
| xtd::unique_ptr_object< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object. | |
| template<class object_a_t, class object_b_t> | |
| static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal. | |
| template<class object_a_t, class object_b_t> | |
| static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are the same instance. | |
| using xtd::collections::generic::queue< type_t, allocator_t >::value_type |
Represents the list value type.
| using xtd::collections::generic::queue< type_t, allocator_t >::base_type |
Represents the list base type.
| using xtd::collections::generic::queue< type_t, allocator_t >::size_type |
Represents the list size type (usually xtd::size).
| using xtd::collections::generic::queue< type_t, allocator_t >::reference |
Represents the reference of list value type.
| using xtd::collections::generic::queue< type_t, allocator_t >::const_reference |
Represents the const reference of list value type.
|
default |
Initializes a new instance of the xtd::collections::generic::queue <type_t> class that is empty and has the default initial capacity.
|
default |
Move constructor with specified queue.
| queue | The xtd::collections::generic::queue <type_t> which elements will be moved from. |
|
default |
Default copy constructor with specified queue.
| queue | The xtd::collections::generic::queue <type_t> which elements will be inserted from. |
|
inline |
Move constructor with specified queue.
| queue | The std::queue <type_t> which elements will be moved from. |
|
inline |
Default copy constructor with specified queue.
| queue | The std::queue <type_t> which elements will be inserted from. |
|
inline |
Initializes a new instance of the xtd::collections::generic::queue <type_t> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
| collection | The collection whose elements are copied to the new xtd::collections::generic::queue <type_t>. |
|
inline |
Initializes a new instance of the xtd::collections::generic::queue <type_t> class that is empty and has the specified initial capacity.
| capacity | The initial number of elements that the xtd::collections::generic::queue <type_t> can contain. |
|
inline |
Constructs the container with the contents of the specified initializer list, and allocator.
| items | The initializer list to initialize the elements of the container with. |
|
inline |
Constructs the container with the contents of the range [first, last).
| first | The first iterator the range to copy the elements from. |
| last | The last iterator the range to copy the elements from. |
|
inlinenoexcept |
Gets the total numbers of elements the internal data structure can hold without resizing.
|
inlinenodiscardoverridenoexcept |
Gets the number of nodes actually contained in the xtd::collections::generic::queue <type_t>.
|
inline |
Gets a std::queue<type_t>.
|
inlineoverride |
Removes all elements from the xtd::collections::generic::queue <type_t>.
|
inlineoverridenoexcept |
Determines whether an element is in the xtd::collections::generic::queue <type_t>.
| item | The object to locate in the xtd::collections::generic::queue <type_t>. |
true if item is found in the xtd::collections::generic::queue <type_t>; otherwise, false.
|
inlineoverride |
Copies the entire xtd::colllections::generic::linked_list <type_t> to a compatible one-dimensional array, starting at the specified index of the target array.
| array | The one-dimensional Array that is the destination of the elements copied from xtd::colllections::generic::linked_list <type_t>. The Array must have zero-based indexing. |
| array_index | The zero-based index in array at which copying begins. |
| xtd::argument_out_of_range_exception | The number of elements in the source xtd::colllections::generic::linked_list <type_t> is greater than the available space from arrayIndex to the end of the destination array. |
|
inline |
Removes and returns the object at the beginning of the xtd::collections::generic::queue <type_t>.
| xtd::invalid_operation_exception | The xtd::collections::generic::queue <type_t> is empty. |
|
inline |
Adds an object to the end of the xtd::collections::generic::queue <type_t>.
| item | The object to add to the xtd::collections::generic::queue <type_t>. The value can be null for reference types. |
|
inline |
Ensures that the capacity of this queue is at least the specified capacity. If the current capacity is less than capacity, it is increased to at least the specified capacity.
| capacity | The minimum capacity to ensure. |
|
inlineoverridenoexcept |
Returns an enumerator that iterates through the xtd::collections::generic::queue <type_t>.
|
inlinenodiscard |
Returns the object at the beginning of the xtd::collections::generic::queue <type_t> without removing it.
| xtd::invalid_operation_exception | The xtd::collections::generic::queue <type_t> is empty. |
|
inline |
Copies the xtd::collections::generic::queue <type_t> elements to a new array.
|
inlineoverridevirtualnoexcept |
Returns a xtd::string that represents the current object.
Reimplemented from xtd::object.
|
inline |
Sets the capacity to the actual number of elements in the xtd::collections::generic::queue <type_t>, if that number is less than 90 percent of current capacity.
|
inline |
Sets the capacity of a xtd::collections::generic::queue <type_t> object to the specified number of entries.
| capacity | The new capacity. |
| xtd::argument_out_of_range_exception | Passed capacity is lower than entries count. |
|
inlinenodiscardnoexcept |
Removes the object at the beginning of the xtd::collections::generic::queue <type_t>, and copies it to the result parameter.
| The | removed object. |
true if the object is successfully removed; false if the xtd::collections::generic::queue <type_t> is empty.
|
inlinenodiscardnoexcept |
Returns a value that indicates whether there is an object at the beginning of the xtd::collections::generic::queue <type_t>, and if one is present, copies it to the result parameter. The object is not removed from the xtd::collections::generic::queue <type_t>.
| If | present, the object at the beginning of the xtd::collections::generic::queue <type_t>; otherwise, the default value of type_t. |
true if there is an object at the beginning of the xtd::collections::generic::queue <type_t>; false if the xtd::collections::generic::queue <type_t> is empty.
|
inline |
Gets a std::queue<type_t>.