SystemEX  Lacking
Additional generic collection types missing in .net
SystemEx.IRange< T > Interface Template Reference
Inheritance diagram for SystemEx.IRange< T >:

Public Member Functions

IRange< T > GetRange (T? tstart, T? tend)
 Creates a new range using optional override values for start and end.
IRange< T >? Union (IRange< T > other)
 Computes the union of this range with another range if they overlap or are adjacent. Otherwise returns null.
bool IsAdjacent (IRange< T > other)
 Determines whether this range touches another range at exactly one boundary.
bool Contains (T x)
 Determines whether the specified value lies within the range.
IRange< T >? Intersect (IRange< T > other)
 Computes the intersection of this range with another range.
bool Overlaps (IRange< T > other)
 Determines whether this range overlaps with another range.

Properties

IForwardIterator< T > Begin [get]
 Returns an iterator positioned at the start of the range.
IForwardIterator< T > End [get]
 Returns an iterator positioned past the end of the range.
From [get, set]
 Gets or sets the start value of the range.
To [get, set]
 Gets or sets the end value of the range.
bool IsValid [get]
 Indicates whether the range is valid (Start ≤ End).
bool IsSame [get]
 Indicates whether the range represents a single value (Start == End).

Member Function Documentation

◆ Contains()

bool SystemEx.IRange< T >.Contains ( T x)

Determines whether the specified value lies within the range.

Parameters
xValue to test.
Returns
True if the value is inside the range.

Implemented in SystemEx.NumberRange< T >.

◆ GetRange()

IRange< T > SystemEx.IRange< T >.GetRange ( T? tstart,
T? tend )

Creates a new range using optional override values for start and end.

Parameters
tstartOptional new start value.
tendOptional new end value.
Returns
A new range with substituted boundaries.

Implemented in SystemEx.NumberRange< T >.

◆ Intersect()

IRange< T >? SystemEx.IRange< T >.Intersect ( IRange< T > other)

Computes the intersection of this range with another range.

Parameters
otherRange to intersect with.
Returns
A new range representing the intersection, or null if no overlap exists.

Implemented in SystemEx.NumberRange< T >.

◆ IsAdjacent()

bool SystemEx.IRange< T >.IsAdjacent ( IRange< T > other)

Determines whether this range touches another range at exactly one boundary.

Parameters
otherRange to test.
Returns
True if the ranges are adjacent.

Implemented in SystemEx.NumberRange< T >.

◆ Overlaps()

bool SystemEx.IRange< T >.Overlaps ( IRange< T > other)

Determines whether this range overlaps with another range.

Parameters
otherRange to test.
Returns
True if the ranges overlap.

Implemented in SystemEx.NumberRange< T >.

◆ Union()

IRange< T >? SystemEx.IRange< T >.Union ( IRange< T > other)

Computes the union of this range with another range if they overlap or are adjacent. Otherwise returns null.

Parameters
otherRange to merge with.
Returns
The merged range, or null if no merge is possible.

Implemented in SystemEx.NumberRange< T >.

Property Documentation

◆ Begin

IForwardIterator<T> SystemEx.IRange< T >.Begin
get

Returns an iterator positioned at the start of the range.

Implemented in SystemEx.NumberRange< T >.

34{ get; }

◆ End

IForwardIterator<T> SystemEx.IRange< T >.End
get

Returns an iterator positioned past the end of the range.

Implemented in SystemEx.NumberRange< T >.

39{ get; }

◆ From

T SystemEx.IRange< T >.From
getset

Gets or sets the start value of the range.

Implemented in SystemEx.NumberRange< T >.

44{ get; set; }

◆ IsSame

bool SystemEx.IRange< T >.IsSame
get

Indicates whether the range represents a single value (Start == End).

Implemented in SystemEx.NumberRange< T >.

59{ get; }

◆ IsValid

bool SystemEx.IRange< T >.IsValid
get

Indicates whether the range is valid (Start ≤ End).

Implemented in SystemEx.NumberRange< T >.

54{ get; }

◆ To

T SystemEx.IRange< T >.To
getset

Gets or sets the end value of the range.

Implemented in SystemEx.NumberRange< T >.

49{ get; set; }

The documentation for this interface was generated from the following file:
  • IRange.cs