RequiredSafesData

data class RequiredSafesData(val lanyardRequired: Boolean, val crackerRequired: Boolean, val friendRequired: Boolean, val stripsRequired: Boolean, val pitonRequired: Boolean, val nailRequired: Boolean) : SafesData

Stores the data for the required safes of a Path.

Author

Arnau Mora

Since

20210916

Parameters

lanyardRequired

Sets if it's required to bring lanyards to climb the Path.

crackerRequired

Sets if it's required to bring crackers to climb the Path.

friendRequired

Sets if it's required to bring friends to climb the Path.

stripsRequired

Sets if it's required to bring strips to climb the Path.

pitonRequired

Sets if it's required to bring pitons to climb the Path.

nailRequired

Sets if it's required to bring nails to climb the Path.

Constructors

Link copied to clipboard
fun RequiredSafesData(lanyardRequired: Boolean, crackerRequired: Boolean, friendRequired: Boolean, stripsRequired: Boolean, pitonRequired: Boolean, nailRequired: Boolean)

Functions

Link copied to clipboard
fun any(): Boolean

Checks if any of the objects is required to climb the Path.

Link copied to clipboard
fun count(): Int
Link copied to clipboard
abstract fun describeContents(): Int
Link copied to clipboard
open fun forEach(p0: Consumer<in SafeCountData>)
Link copied to clipboard
operator fun get(index: Int): SafeCountData

Gets the SafeCountData at a index

Link copied to clipboard

Checks if there's at least one count of safes.

Link copied to clipboard
open operator override fun iterator(): Iterator<SafeCountData>
Link copied to clipboard
open override fun list(): List<SafeCountData>

Returns the class as a SafeCountData which can be used for displaying in the UI easily.

Link copied to clipboard
Link copied to clipboard
fun sum(): Long
Link copied to clipboard
open override fun toJSONString(): String

Converts the class to a JSON-formatted String.

Link copied to clipboard
abstract fun writeToParcel(p0: Parcel, p1: Int)

Properties

Link copied to clipboard
open override val color: Int

The color that will be shown on the card's background when displaying the data to the user.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
operator fun <D : DataClass<*, *, *>> Iterable<D>.get(objectId: String): D?

Gets an element from the Iterable.

Link copied to clipboard

Parses a list of Grades as AnnotatedStrings, so they get colored.

Link copied to clipboard
fun <D : DataClass<*, *, *>> Iterable<D>.has(objectId: String): Boolean

Checks if an Iterable contains a DataClass with the set objectId.

Link copied to clipboard
Link copied to clipboard