Represents a range that has start and end indexes.
Public Aliases | |
| using | index_type |
| Represents the xtd::range index type. | |
| using | size_type |
| Represents the size type. | |
Public Constructors | |
| range () noexcept=default | |
| Instantiates a new xtd::range instance. | |
| range (const index_type &start, const index_type &end) noexcept | |
| Instantiates a new xtd::range instance with the specified starting and ending indexes. | |
| range (xtd::integer auto start, const xtd::integer auto end) noexcept | |
| Instantiates a new xtd::range instance with the specified starting and ending indexes. | |
Public Properties | |
| constexpr auto | end () const noexcept -> const index_type & |
| Gets an Index that represents the exclusive end index of the range. | |
| constexpr auto | start () const noexcept -> const index_type & |
| Gets the inclusive start index of the Range. | |
Public Methods | |||
Determines whether the specified object is equal to the current object.
| |||
| constexpr auto | equals (const object &obj) const noexcept -> bool override | ||
| Determines whether the specified object is equal to the current object. | |||
| constexpr auto | equals (const range &value) const noexcept -> bool override | ||
| Indicates whether the current object is equal to another object of the same type. | |||
| constexpr auto | get_hash_code () const noexcept -> size_type override | ||
| Serves as a hash function for a particular type. | |||
| auto | to_string () const noexcept -> xtd::string override | ||
| Returns the string representation of the current Range object. | |||
Public Static Properties | |
Gets a xtd::range object that starts from the first element to the end.
| |
| static auto | all () noexcept -> xtd::range |
Public Static Methods | |||
Creates a xtd::range object starting from the first element in the collection to a specified end index.
| |||
| static auto | end_at (index_type end) noexcept -> xtd::range | ||
| static auto | end_at (xtd::integer auto end) noexcept -> xtd::range | ||
| Creates a xtd::range object starting from the first element in the collection to a specified end index. | |||
| static auto | start_at (index_type start) noexcept -> xtd::range | ||
| Creates a new xtd::range object starting from a specified start index to the end of the collection. | |||
| static auto | start_at (xtd::integer auto start) noexcept -> xtd::range | ||
| Creates a new xtd::range object starting from a specified start index to the end of the collection. | |||
Additional Inherited Members | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual auto | get_type () const noexcept -> type_object |
| Gets the type of the current instance. | |
| template<typename object_t> | |
| auto | memberwise_clone () const -> xtd::unique_ptr_object< object_t > |
| Creates a shallow copy of the current object. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are considered equal. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are the same instance. | |
| using xtd::range::index_type |
Represents the xtd::range index type.
| using xtd::range::size_type |
Represents the size type.
|
defaultnoexcept |
Instantiates a new xtd::range instance.
|
inlinenoexcept |
Instantiates a new xtd::range instance with the specified starting and ending indexes.
| start | The inclusive start index of the range. |
| end | The exclusive end index of the range. |
|
inlinenoexcept |
Instantiates a new xtd::range instance with the specified starting and ending indexes.
| start | The inclusive start index of the range. |
| end | The exclusive end index of the range. |
|
inlinenodiscardconstexprnoexcept |
Gets an Index that represents the exclusive end index of the range.
|
inlinenodiscardconstexprnoexcept |
Gets the inclusive start index of the Range.
|
inlinenodiscardconstexproverridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
| obj | The object to compare with the current object. |
Reimplemented from xtd::object.
|
inlinenodiscardconstexproverridevirtualnoexcept |
Indicates whether the current object is equal to another object of the same type.
| obj | An object to compare with this object. |
Implements xtd::iequatable< range >.
|
inlinenodiscardconstexproverridevirtualnoexcept |
Serves as a hash function for a particular type.
Reimplemented from xtd::object.
|
inlinenodiscardoverridevirtualnoexcept |
Returns the string representation of the current Range object.
Reimplemented from xtd::object.
|
inlinestaticnodiscardnoexcept |
Creates a xtd::range object starting from the first element in the collection to a specified end index.
| end | The position of the last element up to which the Range object will be created. |
|
inlinestaticnodiscardnoexcept |
Creates a new xtd::range object starting from a specified start index to the end of the collection.
| start | The position of the first element from which the Range will be created. |
|
inlinestaticnodiscardnoexcept |
Creates a new xtd::range object starting from a specified start index to the end of the collection.
| start | The position of the first element from which the Range will be created. |