-
Notifications
You must be signed in to change notification settings - Fork 36
T_CodeJam_Ranges_Range_1
Andrew Koryavchenko edited this page Jun 17, 2018
·
5 revisions
Describes a range of the values.
Describes a range of the values.
Namespace: CodeJam.Ranges
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
[SerializableAttribute]
public struct Range<T> : IEquatable<Range<T>>,
IFormattable
VB
<SerializableAttribute>
Public Structure Range(Of T)
Implements IEquatable(Of Range(Of T)), IFormattable
F#
[<SealedAttribute>]
[<SerializableAttribute>]
type Range<'T> =
struct
interface IEquatable<Range<'T>>
interface IFormattable
end
- T
- The type of the value. Should implement or .
Name | Description | |
---|---|---|
![]() |
Range(T)(T, T) | Creates instance of |
![]() |
Range(T)(RangeBoundaryFrom(T), RangeBoundaryTo(T)) | Creates instance of |
Name | Description | |
---|---|---|
![]() |
From | Boundary From. Limits the values from the left. |
![]() |
FromValue | The value of Boundary From. |
![]() |
IsEmpty | The range is empty, ∅. |
![]() |
IsInfinite | The range is Infinite range (-∞..+∞). |
![]() |
IsNotEmpty | The range is NOT empty, ≠ ∅. |
![]() |
IsSinglePoint | The range is Zero length range (the values of the boundary From and the boundary To are the same). |
![]() |
To | Boundary To. Limits the values from the right. |
![]() |
ToValue | The value of Boundary To. |
Name | Description | |
---|---|---|
![]() |
Clamp | Ensures that the value fits into a range. |
![]() |
Contains(T) | Determines whether the range contains the specified value. |
![]() |
Contains(Range(T)) | Determines whether the range contains another range. |
![]() |
Contains(RangeBoundaryFrom(T)) | Determines whether the range contains the specified range boundary. |
![]() |
Contains(RangeBoundaryTo(T)) | Determines whether the range contains the specified range boundary. |
![]() |
Contains(T, T) | Determines whether the range contains another range. |
![]() |
Contains(TKey2)(Range(T, TKey2)) | Determines whether the range contains another range. |
![]() |
EndsBefore(T) | Determines whether the range ends before the value specified. |
![]() |
EndsBefore(Range(T)) | Determines whether the range ends before the range specified. |
![]() |
EndsBefore(RangeBoundaryFrom(T)) | Determines whether the range ends before the boundary specified. |
![]() |
EndsBefore(RangeBoundaryTo(T)) | Determines whether the range ends before the boundary specified. |
![]() |
EndsBefore(TKey2)(Range(T, TKey2)) | Determines whether the range ends before the range specified. |
![]() |
Equals(Object) | Indicates whether the current range and a specified object are equal. (Overrides ValueType.Equals(Object).) |
![]() |
Equals(Range(T)) | Indicates whether the current range is equal to another. |
![]() |
ExtendFrom(T) | Extends the range from the left. |
![]() |
ExtendFrom(RangeBoundaryFrom(T)) | Extends the range from the left. |
![]() |
ExtendTo(T) | Extends the range from the right. |
![]() |
ExtendTo(RangeBoundaryTo(T)) | Extends the range from the right. |
![]() |
GetHashCode | Returns a hash code for the current range. (Overrides ValueType.GetHashCode().) |
![]() |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() |
HasIntersection(Range(T)) | Determines whether the range has intersection with another range. |
![]() |
HasIntersection(T, T) | Determines whether the range has intersection with another range. |
![]() |
HasIntersection(TKey2)(Range(T, TKey2)) | Determines whether the range has intersection with another range. |
![]() |
Intersect(Range(T)) | Returns an intersection of the the ranges. |
![]() |
Intersect(T, T) | Returns an intersection of the the ranges. |
![]() |
Intersect(TKey2)(Range(T, TKey2)) | Returns an intersection of the the ranges. |
![]() |
MakeExclusive | Replaces inclusive boundaries with exclusive ones with the values from the selector callbacks |
![]() |
MakeInclusive | Replaces exclusive boundaries with inclusive ones with the values from the selector callbacks |
![]() |
StartsAfter(T) | Determines whether the range starts after the value specified. |
![]() |
StartsAfter(Range(T)) | Determines whether the range starts after the range specified. |
![]() |
StartsAfter(RangeBoundaryFrom(T)) | Determines whether the range starts after the boundary specified. |
![]() |
StartsAfter(RangeBoundaryTo(T)) | Determines whether the range starts after the boundary specified. |
![]() |
StartsAfter(TKey2)(Range(T, TKey2)) | Determines whether the range starts after the range specified. |
![]() |
ToString() | Returns string representation of the range. (Overrides ValueType.ToString().) |
![]() |
ToString(IFormatProvider) | Returns string representation of the range using the specified format string. If T does not implement the format string is ignored. |
![]() |
ToString(String) | Returns string representation of the range using the specified format string. If T does not implement the format string is ignored. |
![]() |
ToString(String, IFormatProvider) | Returns string representation of the range using the specified format string. If T does not implement the format string is ignored. |
![]() |
TrimFrom(T) | Trims the range from the left. |
![]() |
TrimFrom(RangeBoundaryFrom(T)) | Trims the range from the left. |
![]() |
TrimTo(T) | Trims the range from the right. |
![]() |
TrimTo(RangeBoundaryTo(T)) | Trims the range from the right. |
![]() |
Union(T) | Returns a union range containing original range and the value. |
![]() |
Union(Range(T)) | Returns a union range containing both of the ranges. |
![]() |
Union(T, T) | Returns a union range containing both of the ranges. |
![]() |
Union(TKey2)(Range(T, TKey2)) | Returns a union range containing both of the ranges. |
![]() |
WithKey(TKey2) | Creates a new range with the key specified. |
![]() |
WithValues(T2)(Func(T, T2)) | Updates the values of the boundaries of the range. |
![]() |
WithValues(T2)(Func(T, T2), Func(T, T2)) | Updates the values of the boundaries of the range. |
Name | Description | |
---|---|---|
![]() ![]() |
Equality | Implements the operator ==. |
![]() ![]() |
Inequality | Implements the operator !=. |
Name | Description | |
---|---|---|
![]() ![]() |
Empty | Empty range, ∅ |
![]() ![]() |
Infinite | Infinite range, (-∞..+∞) |
Name | Description | |
---|---|---|
![]() |
GetComplementation(T) | Returns complementation composite range. Result range contains result of (infinityRange.Exclude(range). (Defined by CompositeRangeExtensions.) |
![]() |
ToCompositeRange(T) | Converts range to the composite range. (Defined by CompositeRangeExtensions.) |
CodeJam.Ranges Namespace
System.IComparable(T)
System.IComparable