IDS peak ICV v1.4.0
Loading...
Searching...
No Matches
RangeT< T > Class Template Reference

Public Member Functions

 RangeT (T minimum, T maximum, T increment)
 Initializes a new instance of the RangeT<T> class with specified minimum, maximum, and increment values.
 
override bool Equals (object? obj)
 Determines whether the specified object is equal to the current range.
 
override int GetHashCode ()
 Returns a hash code for the current range.
 
override string ToString ()
 Returns a string representation of the range.
 

Properties

T Minimum [get]
 Gets the lower boundary of the range.
 
T Maximum [get]
 Gets the upper boundary of the range.
 
T Increment [get]
 Gets the increment value associated with this range.
 

Detailed Description

Represents a numeric range with defined boundaries and a fixed increment. A Range models a continuous sequence of values starting from a minimum value, ending at a maximum value, and progressing in steps defined by an increment. It supports integers and floating-point numbers. This class ensures that the increment does not exceed the total span between the minimum and maximum bounds. The range is inclusive of its boundary values.

Template Parameters
TThe type of the parameters. Must be a value type implementing IComparable.
Since
IDSImaging.Peak.Common 1.3
Type Constraints
T :struct 
T :IComparable<T> 

Constructor & Destructor Documentation

◆ RangeT()

RangeT ( T minimum,
T maximum,
T increment )
inline

Initializes a new instance of the RangeT<T> class with specified minimum, maximum, and increment values.

Parameters
minimumThe inclusive starting (lower) boundary of the range.
maximumThe inclusive ending (upper) boundary of the range.
incrementThe step size or increment between values within the range.
Exceptions
CommonInvalidParameterExceptionThrown when minimum is greater than maximum or when increment is larger than the total range.

Member Function Documentation

◆ Equals()

override bool Equals ( object? obj)
inline

Determines whether the specified object is equal to the current range.

Parameters
objThe object to compare with the current range.
Returns
true if the specified object is equal to the current range; otherwise, false.

◆ GetHashCode()

override int GetHashCode ( )
inline

Returns a hash code for the current range.

◆ ToString()

override string ToString ( )
inline

Returns a string representation of the range.

Property Documentation

◆ Increment

T Increment
get

Gets the increment value associated with this range.

◆ Maximum

T Maximum
get

Gets the upper boundary of the range.

◆ Minimum

T Minimum
get

Gets the lower boundary of the range.