Class $k.Interval

An interval representing all values between two endpoints. One endpoint may be undefined.

Class Summary
Constructor Attributes Constructor Name and Description
 
$k.Interval(start, stop)
Constructs an interval from start to stop

Method Summary

Class Detail

$k.Interval(start, stop)
Constructs an interval from start to stop
Parameters:
start
The lower endpoint
stop
The upper endpoint

Method Detail

  • {boolean} equals(value)
    Returns true if the values are equal
    Parameters:
    value
    Returns:
    {boolean}
  • setStart(start)
    Sets the lower endpoint. Pass undefined to denote an interval without lower endpoint
    Parameters:
    start
  • setStop(stop)
    Sets the upper endpoint. Pass undefined to denote an interval without upper endpoint
    Parameters:
    stop
  • start()
    Returns the lower endpoint, or undefined if the interval has no lower endpoint.
  • stop()
    Returns the upper endpoint , or undefined if the interval has no upper endpoint.