Forward iterator over a normalized numeric range. Supports stepping by one unit and exposes the current value and end-of-range state.
More...
|
| | NumberRangeIterator (T start, T end) |
| | Initializes a new iterator positioned at start and iterating until end .
|
| void | Forward () |
| | Moves the iterator one step forward.
|
| void | Forward (long i) |
| | Moves the iterator N step forward.
|
| IIterator< T > | Clone () |
| | Creates a copy of this iterator at its current position.
|
| override bool | Equals (object? obj) |
| | Compares two iterators for equality based on their current position and end boundary.
|
| override int | GetHashCode () |
| | Computes a hash code for this iterator.
|
|
| T | Current [get] |
| | Gets the element at the current iterator position.
|
| bool | IsEnd [get] |
| | Indicates whether the iterator has reached the end boundary.
|
Forward iterator over a normalized numeric range. Supports stepping by one unit and exposes the current value and end-of-range state.
- Template Parameters
-
| T | Numeric type implementing INumber<T>. |
◆ Clone()
| IIterator< T > SystemEx.NumberRangeIterator< T >.Clone |
( |
| ) |
|
◆ Equals()
| override bool SystemEx.NumberRangeIterator< T >.Equals |
( |
object? | obj | ) |
|
Compares two iterators for equality based on their current position and end boundary.
89 => obj is NumberRangeIterator<T> it &&
90 it.m_current.Equals(m_current) &&
91 it.m_end.Equals(m_end);
◆ Forward() [1/2]
| void SystemEx.NumberRangeIterator< T >.Forward |
( |
| ) |
|
◆ Forward() [2/2]
| void SystemEx.NumberRangeIterator< T >.Forward |
( |
long | i | ) |
|
◆ GetHashCode()
| override int SystemEx.NumberRangeIterator< T >.GetHashCode |
( |
| ) |
|
Computes a hash code for this iterator.
97 => HashCode.Combine(m_current, m_end);
◆ NumberRangeIterator()
| SystemEx.NumberRangeIterator< T >.NumberRangeIterator |
( |
T | start, |
|
|
T | end ) |
Initializes a new iterator positioned at start and iterating until end .
- Parameters
-
| start | Initial iterator position. |
| end | End boundary (inclusive). |
44 {
45 m_current = start;
46 m_end = end;
47 }
◆ operator!=()
Compares two iterators for inequality.
- Parameters
-
| left | Left iterator. |
| right | Right iterator. |
- Returns
- True if the iterators differ.
117 {
118 return !left.Equals(right);
119 }
◆ operator==()
Compares two iterators for equality. Two iterators are equal if both their current position and end boundary match.
- Parameters
-
| left | Left iterator. |
| right | Right iterator. |
- Returns
- True if both iterators are equal.
107 {
108 return left.Equals(right);
109 }
◆ Current
| T SystemEx.NumberRangeIterator< T >.Current |
|
get |
◆ IsEnd
| bool SystemEx.NumberRangeIterator< T >.IsEnd |
|
get |
The documentation for this struct was generated from the following file: