GroupRange

@Serializable
data class GroupRange(val lowAddress: GroupAddress, val highAddress: GroupAddress) : AddressRange

The AllocatedGroupRange represents the range of group addresses that the Provisioner can allocate to newly created groups, without needing to coordinate the group additions with other Provisioners. The lowAddress and highAddress properties represent values from 0xC000 to 0xFEFF. The value of the lowAddress property shall be less than or equal to the value of the highAddress property.

Constructors

Link copied to clipboard
constructor(address: GroupAddress, size: Int)
constructor(lowAddress: GroupAddress, highAddress: GroupAddress)

Creates a Group Range.

Properties

Link copied to clipboard

High value for a given range.

Link copied to clipboard
open override val highAddress: GroupAddress

High address for a given range.

Link copied to clipboard
val low: UShort

Low value for a given range.

Link copied to clipboard
open override val lowAddress: GroupAddress

Low address for a given range.

Functions

Link copied to clipboard
fun contains(value: UShort): Boolean

Checks if the given value is within the range.

fun contains(other: Range): Boolean

Checks if the given value is contained within the range.

Link copied to clipboard
fun distance(other: Range): Int

Returns the closest distance between this and the given range.

Link copied to clipboard
operator fun minus(other: Range): List<Range>

Removes one range from the other.

Link copied to clipboard
fun overlap(other: List<Range>): List<Range>

fun overlap(other: Range): Range?

Returns the overlapping region of a given range

Link copied to clipboard
fun overlaps(otherRanges: List<Range>): Boolean

Checks if the given list of ranges overlaps with the current range

fun overlaps(other: Range): Boolean

Checks if the given range overlaps.

Link copied to clipboard
operator fun plus(other: Range): List<Range>

Adds a range to another.