ClosedRange

E427890

ClosedRange is a Swift Standard Library generic type that represents a range of comparable values that includes both its lower and upper bounds.

All labels observed (1)

Label Occurrences
ClosedRange canonical 1

How this entity was disambiguated

Statements (49)

Predicate Object
instanceOf Swift generic type ⓘ
Swift standard library type ⓘ
canBeEmpty false ⓘ
canBeIteratedWithForIn trueForStrideableBounds ⓘ
conformsTo Codable ⓘ
CustomStringConvertible ⓘ
Equatable ⓘ
Hashable ⓘ
RangeExpression ⓘ
definedIn Swift Standard Library ⓘ
differenceFrom Range is half-open and excludes upper bound ⓘ
exampleUsage if (1...10).contains(x) { ... } ⓘ
let r: ClosedRange<Int> = 1...10 ⓘ
switch x { case 1...5: ... default: break } ⓘ
genericConstraint Bound : Comparable ⓘ
genericParameter Bound ⓘ
hasInitializer init(_:) from Range<Bound> ⓘ
init(uncheckedBounds: (lower: Bound, upper: Bound)) ⓘ
hasMethod clamped(to: ClosedRange<Bound>) ⓘ
contains(_ element: Bound) ⓘ
overlaps(_ other: ClosedRange<Bound>) ⓘ
relative(to: Collection) ⓘ
hasOperatorSupport pattern-matching operator ~= ⓘ
hasProperty lowerBound ⓘ
upperBound ⓘ
includesLowerBound true ⓘ
includesUpperBound true ⓘ
introducedIn Swift 3.0 ⓘ
isClosedRange true ⓘ
isCollection false ⓘ
isHalfOpen false ⓘ
isReferenceType false ⓘ
isSequence false ⓘ
isStruct true ⓘ
isValueSemantics true ⓘ
language Swift ⓘ
module Swift ⓘ
relatedType PartialRangeFrom ⓘ
PartialRangeThrough ⓘ
PartialRangeUpTo ⓘ
Range ⓘ
represents range of comparable values ⓘ
requires lowerBound <= upperBound ⓘ
syntaxExample 1...5 ⓘ
syntaxOperator ... ⓘ
usedFor indexing collections ⓘ
pattern matching in switch statements ⓘ
range checks on Comparable values ⓘ
slicing collections ⓘ

How these facts were elicited

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.