Enum
The common base class of all enum classes. See the Kotlin language documentation for more information on enum classes.
Constructors
<init>
The common base class of all enum classes. See the Kotlin language documentation for more information on enum classes.
<init>(name: String, ordinal: Int)Properties
name
Returns the name of this enum constant, exactly as declared in its enum declaration.
val name: Stringordinal
Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).
val ordinal: IntFunctions
clone
Throws an exception since enum constants cannot be cloned.
This method prevents enum classes from inheriting from Cloneable.
fun clone(): Anyequals
Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements:
fun equals(other: Any?): BooleanhashCode
Returns a hash code value for the object. The general contract of hashCode is:
fun hashCode(): InttoString
Returns a string representation of the object.
open fun toString(): StringExtension Properties
Extension Functions
coerceAtLeast
Ensures that this value is not less than the specified minimumValue.
fun <T : Comparable<T>> T.coerceAtLeast(minimumValue: T): TcoerceAtMost
Ensures that this value is not greater than the specified maximumValue.
fun <T : Comparable<T>> T.coerceAtMost(maximumValue: T): TcoerceIn
Ensures that this value lies in the specified range minimumValue..maximumValue.
fun <T : Comparable<T>> T.coerceIn(
minimumValue: T?,
maximumValue: T?
): TEnsures that this value lies in the specified range.
fun <T : Comparable<T>> T.coerceIn(
range: ClosedFloatingPointRange<T>
): Tfun <T : Comparable<T>> T.coerceIn(range: ClosedRange<T>): TcompareTo
Compares this object with the specified object for order. Returns zero if this object is equal to the specified other object, a negative number if it's less than other, or a positive number if it's greater than other.
infix fun <T> Comparable<T>.compareTo(other: T): IntrangeTo
Creates a range from this Comparable value to the specified that value.
operator fun <T : Comparable<T>> T.rangeTo(
that: T
): ClosedRange<T>Inheritors
AnnotationRetention
Contains the list of possible annotation's retentions.
enum class AnnotationRetentionAnnotationTarget
Contains the list of code elements which are the possible annotation targets
enum class AnnotationTargetCharCategory
Represents the character general category in the Unicode specification.
enum class CharCategoryCharDirectionality
Represents the Unicode directionality of a character. Character directionality is used to calculate the visual ordering of text.
enum class CharDirectionalityCpuArchitecture
Central Processor Unit architecture.
enum class CpuArchitectureDeprecationLevel
Possible levels of a deprecation. The level specifies how the deprecated element usages are reported in code.
enum class DeprecationLevelDurationUnit
The list of possible time measurement units, in which a duration can be expressed.
enum class DurationUnitFileWalkDirection
An enumeration to describe possible walk directions. There are two of them: beginning from parents, ending with children, and beginning from children, ending with parents. Both use depth-first search.
enum class FileWalkDirectionFutureState
State of the future object.
enum class FutureStateInvocationKind
Specifies how many times a function invokes its function parameter in place.
enum class InvocationKindKVariance
Represents variance applied to a type parameter on the declaration site (declaration-site variance), or to a type in a projection (use-site variance).
enum class KVarianceKVisibility
Visibility is an aspect of a Kotlin declaration regulating where that declaration is accessible in the source code.
Visibility can be changed with one of the following modifiers: public, protected, internal, private.
enum class KVisibilityLazyThreadSafetyMode
Specifies how a Lazy instance synchronizes initialization among multiple threads.
enum class LazyThreadSafetyModeMemoryModel
Memory model.
enum class MemoryModelOnErrorAction
Enum that can be used to specify behaviour of the copyRecursively() function
in exceptional conditions.
enum class OnErrorActionOsFamily
Operating system family.
enum class OsFamilyRegexOption
Provides enumeration values to use to set regular expression options.
enum class RegexOptionenum class RegexOption : FlagEnumTransferMode
Object Transfer Basics.
enum class TransferMode