Skip to content

Methods_T_CodeJam_Ranges_RangeBoundaryTo_1

Andrew Koryavchenko edited this page Jul 4, 2017 · 3 revisions

RangeBoundaryTo(T) Methods

The RangeBoundaryTo(T) generic type exposes the following members.

Methods

 

Name Description
Public methodStatic member AdjustAndCreate Infrastructure helper method to create a boundary that handles default and infinite values. The boundaryKind should be either Inclusive or Exclusive
Public method CompareTo(T) Compares the current boundary with the value of another To boundary. Following order is used: '∅' < '+∞' < 'a)' < '[a' == 'a]' < '(a' < '-∞'.
Public method CompareTo(RangeBoundaryFrom(T)) Compares the current boundary with another one. Following order is used: '∅' < '+∞' < 'a)' < '[a' == 'a]' < '(a' < '-∞'.
Public method CompareTo(RangeBoundaryTo(T)) Compares the current boundary with another one. Following order is used: '∅' < '+∞' < 'a)' < '[a' == 'a]' < '(a' < '-∞'.
Public method Equals(Object) Indicates whether the current boundary and a specified object are equal. (Overrides ValueType.Equals(Object).)
Public method Equals(RangeBoundaryTo(T)) Indicates whether the current boundary is equal to another.
Public method 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.
Public method GetHashCode Returns the hash code for the current boundary. (Overrides ValueType.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetValueOrDefault() The value of the boundary or the default(T) if HasValue property equals to false.
Public method GetValueOrDefault(T) The value of the boundary or the defaultValue if HasValue property equals to false.
Public method IsComplementationFor Checks that the boundary is complementation for specified boundary.
Public methodStatic member IsValid Infrastructure helper method to check if the value can be used as the value of the boundary.
Public method ToExclusive Creates a new boundary with exclusive boundary kind if the current boundary has a value. The original boundary is returned otherwise.
Public method ToInclusive Creates a new boundary with inclusive boundary kind if the current boundary has a value. The original boundary is returned otherwise.
Public method ToString() Returns string representation of the boundary. (Overrides ValueType.ToString().)
Public method ToString(String) Returns string representation of the boundary using the specified format string. If T does not implement the format string is ignored
Public method ToString(String, IFormatProvider) Returns string representation of the boundary using the specified format string. If T does not implement the format string is ignored
Public method 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.
Public method 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

See Also

Reference

RangeBoundaryTo(T) Structure
CodeJam.Ranges Namespace

Clone this wiki locally