Type Hierarchy:

- Anything
  - Object
    - Range<Element>

Satisfied Interfaces: Category, Cloneable<List<Element>>, Collection<Element>, Correspondence<Integer,Element>, Iterable<Element,Nothing>, List<Element>, Ranged<Integer,List<Element>>, Sequence<Element>, Sequential<Element>

Represents the range of totally ordered, ordinal values generated by two endpoints of type `Ordinal` and `Comparable`. If the first value is smaller than the last value, the range is increasing. If the first value is larger than the last value, the range is decreasing. If the two values are equal, the range contains exactly one element. The range is always nonempty, containing at least one value.

A range may be produced using the `..` operator:

    for (i in min..max) { ... }
    if (char in 'A'..'Z') { ... }

By: Gavin

Initializer
Range(Element first, Element last) Parameters: first The start of the range. last The end of the range.

Attributes
clone | Source Code shared actual Range<Element> clone Returns the range itself, since ranges are immutable. Refined declaration: clone
coalesced | Source Code shared actual Range<Element> coalesced Returns the range itself, since a Range cannot contain nulls. Refined declaration: coalesced
decreasing | Source Code shared Boolean decreasing Determines if the range is decreasing.
first | Source Code shared actual Element first The start of the range. Refined declaration: first
last | Source Code shared actual Element last The end of the range. Refined declaration: last
lastIndex | Source Code shared actual Integer lastIndex The index of the end of the range. Refined declaration: lastIndex
rest | Source Code shared actual Element[] rest The rest of the range, without the start of the range. Refined declaration: rest
reversed | Source Code shared actual Range<Element> reversed Reverse this range, returning a new range. Refined declaration: reversed
sequence | Source Code shared actual Range<Element> sequence Returns this range. Refined declaration: sequence
size | Source Code shared actual Integer size The nonzero number of elements in the range. Refined declaration: size
string | Source Code shared actual String string A developer-friendly string representing the instance. Concatenates the name of the concrete class of the instance with the `hash` of the instance. Subclasses are encouraged to refine this implementation to produce a more meaningful representation. Refined declaration: string

Inherited Attributes
Attributes inherited from: Object hash
Attributes inherited from: Cloneable<Clone> clone
Attributes inherited from: Collection<Element> string
Attributes inherited from: Correspondence<Key,Item> keys
Attributes inherited from: Iterable<Element,Absent> coalesced, cycled, empty, first, indexed, last, rest, sequence, size, string
Attributes inherited from: List<Element> hash, lastIndex, reversed
Attributes inherited from: [Element+] string
Attributes inherited from: Element[] string

Methods
by | Source Code shared actual {Element+} by(Integer step) Produce an `Iterable` containing every `step`th element of this iterable object. If the step size is `1`, the `Iterable` contains the same elements as this iterable object. The step size must be greater than zero. The expression
    (0..10).by(3)
results in an iterable object with the elements `0`, `3`, `6`, and `9` in that order. Refined declaration: by
contains | Source Code shared actual Boolean contains(Object element) Determines if this range includes the given object. Refined declaration: contains
containsElement | Source Code shared Boolean containsElement(Element x) Determines if the range includes the given value.
count | Source Code shared actual Integer count(Boolean selecting(Element element)) Return the number of elements in this `Iterable` that satisfy the predicate function. Refined declaration: count
equals | Source Code shared actual Boolean equals(Object that) Determines if two ranges are the same by comparing their endpoints. Refined declaration: equals
get | Source Code shared actual Element? get(Integer n) The element of the range that occurs `n` values after the start of the range. Note that this operation is inefficient for large ranges. Refined declaration: get
includes | Source Code shared actual Boolean includes(List<Anything> sublist) Determine if the given list occurs at some index in this list. Refined declaration: includes
includesRange | Source Code shared Boolean includesRange(Range<Element> sublist) Determines if this range includes the given range.
iterator | Source Code shared actual Iterator<Element> iterator() An iterator for the elements of the range. Refined declaration: iterator
occurs | Source Code shared actual Boolean occurs(Anything element) Determines if this range includes the given value. Refined declaration: occurs
segment | Source Code shared actual Range<Element>|[] segment(Integer from, Integer length) Obtain a segment containing the mapped values starting from the given index, with the given length. Refined declaration: segment
skipping | Source Code shared actual Range<Element>|[] skipping(Integer skip) Produce an `Iterable` containing the elements of this iterable object, after skipping the first `skip` elements. If this iterable object does not contain more elements than the specified number of elements, the `Iterable` contains no elements. Refined declaration: skipping
span | Source Code shared actual Range<Element>|[] span(Integer from, Integer to) Obtain a span containing the mapped values between the two given indices. Refined declaration: span
spanFrom | Source Code shared actual Range<Element>|[] spanFrom(Integer from) Obtain a span containing the mapped values between the starting index and the end of the receiver. Refined declaration: spanFrom
spanTo | Source Code shared actual Range<Element>|[] spanTo(Integer to) Obtain a span containing the mapped values between the start of the receiver and the end index. Refined declaration: spanTo
taking | Source Code shared actual Range<Element>|[] taking(Integer take) Produce an `Iterable` containing the first `take` elements of this iterable object. If the specified number of elements is larger than the number of elements of this iterable object, the `Iterable` contains the same elements as this iterable object. Refined declaration: taking

Inherited Methods
Methods inherited from: Category contains, containsAny, containsEvery
Methods inherited from: Correspondence<Key,Item> defines, definesAny, definesEvery, get, items
Methods inherited from: Iterable<Element,Absent> any, by, chain, collect, count, cycle, defaultNullElements, every, filter, find, findLast, fold, following, iterator, longerThan, map, repeat, select, shorterThan, skipping, skippingWhile, sort, taking, takingWhile
Methods inherited from: List<Element> endsWith, equals, firstInclusion, firstOccurrence, includes, includesAt, inclusions, indexes, initial, lastInclusion, lastOccurrence, occurrences, occurs, occursAt, startsWith, terminal, trim, trimLeading, trimTrailing, withLeading, withTrailing
Methods inherited from: Ranged<Index,Span> segment, span, spanFrom, spanTo