Click or drag to resize

RangeTRange, TState Class

Represents a range of values defined by a start and end value with encapsulated state.
Inheritance Hierarchy
SystemObject
  GSFRangeTRange, TState

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
public sealed class Range<TRange, TState>
View Source

Type Parameters

TRange
TState

The RangeTRange, TState type exposes the following members.

Constructors
 NameDescription
Public methodRangeTRange, TState Creates a new instance of the RangeTRange, TState class using the default comparer.
Top
Properties
 NameDescription
Public propertyEnd Gets the end value of the range.
Public propertyStart Gets the start value of the range.
Public propertyState Gets the state encapsulated by the range.
Top
Methods
 NameDescription
Public methodContains(TRange) Determines whether the range contains the given value.
Public methodContains(RangeTRange, TState) Determines whether the range contains the given range.
Public methodContains(TRange, IComparerTRange) Determines whether the range contains the given value.
Public methodContains(TRange, ComparisonTRange) Determines whether the range contains the given value.
Public methodContains(RangeTRange, TState, IComparerTRange) Determines whether the range contains the given range.
Public methodContains(RangeTRange, TState, ComparisonTRange) Determines whether the range contains the given range.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodStatic memberMerge(IEnumerableRangeTRange, TState) Merges all ranges in a collection of ranges.
Public methodMerge(RangeTRange, TState) Merges two ranges into one range that fully encompasses both ranges.
Public methodStatic memberMerge(IEnumerableRangeTRange, TState, ComparerTRange) Merges all ranges in a collection of ranges.
Public methodStatic memberMerge(IEnumerableRangeTRange, TState, ComparisonTRange) Merges all ranges in a collection of ranges.
Public methodMerge(RangeTRange, TState, IComparerTRange) Merges two ranges into one range that fully encompasses both ranges.
Public methodMerge(RangeTRange, TState, ComparisonTRange) Merges two ranges into one range that fully encompasses both ranges.
Public methodStatic memberMergeAllOverlapping(IEnumerableRangeTRange, TState) Merges all consecutive groups of overlapping ranges in a collection and returns the resulting collection of ranges.
Public methodStatic memberMergeAllOverlapping(IEnumerableRangeTRange, TState, IComparerTRange) Merges all consecutive groups of overlapping ranges in a collection and returns the resulting collection of ranges.
Public methodStatic memberMergeAllOverlapping(IEnumerableRangeTRange, TState, ComparisonTRange) Merges all consecutive groups of overlapping ranges in a collection and returns the resulting collection of ranges.
Public methodStatic memberMergeConsecutiveOverlapping(IEnumerableRangeTRange, TState) Merges all consecutive groups of overlapping ranges in a collection and returns the resulting collection of ranges.
Public methodStatic memberMergeConsecutiveOverlapping(IEnumerableRangeTRange, TState, IComparerTRange) Merges all consecutive groups of overlapping ranges in a collection and returns the resulting collection of ranges.
Public methodStatic memberMergeConsecutiveOverlapping(IEnumerableRangeTRange, TState, ComparisonTRange) Merges all consecutive groups of overlapping ranges in a collection and returns the resulting collection of ranges.
Public methodOverlaps(RangeTRange, TState) Determines whether the range overlaps with the given range.
Public methodOverlaps(RangeTRange, TState, IComparerTRange) Determines whether the range overlaps with the given range.
Public methodOverlaps(RangeTRange, TState, ComparisonTRange) Determines whether the range overlaps with the given range.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
This class provides flexibility in allowing the user to define their own state and how it is merged. Because of potentially undesirable behavior which could result from merging objects inherited from this class, the class has been sealed to prevent inheritance.
See Also

Reference

GSF Namespace