-
Notifications
You must be signed in to change notification settings - Fork 35
T_CodeJam_Ranges_RangeBoundaryFrom_1
Andrew Koryavchenko edited this page Jun 17, 2018
·
4 revisions
The From boundary of the range.
The From boundary of the range.
Namespace: CodeJam.Ranges
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
[SerializableAttribute]
public struct RangeBoundaryFrom<T> : IEquatable<RangeBoundaryFrom<T>>,
IComparable<RangeBoundaryFrom<T>>, IComparable<RangeBoundaryTo<T>>, IComparable<T>,
IComparable, IFormattable
VB
<SerializableAttribute>
Public Structure RangeBoundaryFrom(Of T)
Implements IEquatable(Of RangeBoundaryFrom(Of T)), IComparable(Of RangeBoundaryFrom(Of T)),
IComparable(Of RangeBoundaryTo(Of T)), IComparable(Of T), IComparable,
IFormattable
F#
[<SealedAttribute>]
[<SerializableAttribute>]
type RangeBoundaryFrom<'T> =
struct
interface IEquatable<RangeBoundaryFrom<'T>>
interface IComparable<RangeBoundaryFrom<'T>>
interface IComparable<RangeBoundaryTo<'T>>
interface IComparable<'T>
interface IComparable
interface IFormattable
end
- T
- The type of the value. Should implement or .
Name | Description | |
---|---|---|
RangeBoundaryFrom(T) | Creates a new range boundary. |
Name | Description | |
---|---|---|
HasValue | The boundary has a value (is not an infinite boundary). | |
IsEmpty | The boundary == ∅. | |
IsExclusiveBoundary | The boundary has value (is not an infinite boundary) but does not include the value. | |
IsInclusiveBoundary | The boundary has value (is not an infinite boundary) and does include the value. | |
IsNegativeInfinity | The boundary == -∞. | |
IsNotEmpty | The boundary != ∅. | |
Kind | The kind of the boundary. | |
Value | The value of the boundary. |
Name | Description | |
---|---|---|
AdjustAndCreate | Infrastructure helper method to create a boundary that handles default and infinite values. The boundaryKind should be either Inclusive or Exclusive | |
CompareTo(T) | Compares the current boundary with the value of another From boundary. Following order is used: '∅' < '-∞' < 'a)' < '[a' == 'a]' < '(a' < '+∞'. | |
CompareTo(RangeBoundaryFrom(T)) | Compares the current boundary with another one. Following order is used: '∅' < '-∞' < 'a)' < '[a' == 'a]' < '(a' < '+∞'. | |
CompareTo(RangeBoundaryTo(T)) | Compares the current boundary with another one. Following order is used: '∅' < '-∞' < 'a)' < '[a' == 'a]' < '(a' < '+∞'. | |
Equals(Object) | Indicates whether the current boundary and a specified object are equal. (Overrides ValueType.Equals(Object).) | |
Equals(RangeBoundaryFrom(T)) | Indicates whether the current boundary is equal to another. | |
GetComplementation | Returns complementation for the boundary. The conversions are: * 'a]' -> '(a' * '[a' -> 'a)' * 'a)' -> '[a' * '(a' -> 'a]' Empty or infinite boundaries will throw. Check the HasValue before calling the method. | |
GetHashCode | Returns the hash code for the current boundary. (Overrides ValueType.GetHashCode().) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetValueOrDefault() |
The value of the boundary or the default(T) if HasValue property equals to false . |
|
GetValueOrDefault(T) |
The value of the boundary or the defaultValue if HasValue property equals to false . |
|
IsComplementationFor | Checks that the boundary is complementation for specified boundary. | |
IsValid | Infrastructure helper method to check if the value can be used as the value of the boundary. | |
ToExclusive | Creates a new boundary with exclusive boundary kind if the current boundary has a value. The original boundary is returned otherwise. | |
ToInclusive | Creates a new boundary with inclusive boundary kind if the current boundary has a value. The original boundary is returned otherwise. | |
ToString() | Returns string representation of the boundary. (Overrides ValueType.ToString().) | |
ToString(String) | Returns string representation of the boundary using the specified format string. If T does not implement the format string is ignored | |
ToString(String, IFormatProvider) | Returns string representation of the boundary using the specified format string. If T does not implement the format string is ignored | |
WithValue(Func(T, T)) | Creates a new boundary with updated value (if the current boundary has one). If the boundary has no value the method returns the boundary unchanged. | |
WithValue(T2)(Func(T, T2)) | Creates a new boundary with updated value (if the current boundary has one). If the boundary has no value the method returns the boundary unchanged. |
Back to Top
Name | Description | |
---|---|---|
Empty | Empty range boundary, ∅. | |
NegativeInfinity | Negative infinity, -∞. |
Heavy tuned to be as fast as it is possible. The order of borders is the following: '∅' < '-∞' < 'a)' < '[a' == 'a]' < '(a' < '+∞'.
CodeJam.Ranges Namespace
System.IComparable(T)
System.IComparable