Zones

object Zones : List<Zone>

A singleton manager for Zones

On initialization, the list of zones is loaded from ZoneList.json by default, but it can be reloaded with different resources via loadZones

Author

Matthew Clark

See also

Properties

Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard
open operator override fun contains(element: Zone): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<Zone>): Boolean
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun forEach(action: Consumer<in Zone>?)
Link copied to clipboard
open operator override fun get(index: Int): Zone

operator fun get(pose: Pose2d, default: Zone = defaultZone): Zone

Gets the zone that the given position is inside. If multiple zones overlap, the first one found will be returned. If the position is not inside a zone, the default value will be returned.

operator fun get(position: Translation2d, default: Zone = defaultZone): Zone

Gets the zone that the given position is inside. If multiple zones overlap, the first one found will be returned. If the position is not inside a zone, the default will be returned.

operator fun get(tag: String, default: Zone = defaultZone): Zone

Gets a zone by its tag, or returns a default if none are found

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun indexOf(element: Zone): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<Zone>
Link copied to clipboard
open override fun lastIndexOf(element: Zone): Int
Link copied to clipboard
open override fun listIterator(): ListIterator<Zone>
open override fun listIterator(index: Int): ListIterator<Zone>
Link copied to clipboard
fun loadZones(stream: InputStream, doClose: Boolean = true)
fun loadZones(resource: URL, doClose: Boolean = true)
Link copied to clipboard
open override fun parallelStream(): Stream<Zone>
Link copied to clipboard
open override fun spliterator(): Spliterator<Zone>
Link copied to clipboard
open override fun stream(): Stream<Zone>
Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<Zone>
Link copied to clipboard
open override fun toString(): String