User Tools

Site Tools


enumerated_class

Enumerated Class

Return to Sealed class; enumerated value) Kotlin glossary, Programming glossary, Kotlin

enumerated class - “A class defining a collection of constants called enumerated values; all instances of the class are of one of the defined values.” (KtPgBNrd 2021)

Snippet from Wikipedia: Enumeration

An enumeration is a complete, ordered listing of all the items in a collection. The term is commonly used in mathematics and computer science to refer to a listing of all of the elements of a set. The precise requirements for an enumeration (for example, whether the set must be finite, or whether the list is allowed to contain repetitions) depend on the discipline of study and the context of a given problem.

Some sets can be enumerated by means of a natural ordering (such as 1, 2, 3, 4, ... for the set of positive integers), but in other cases it may be necessary to impose a (perhaps arbitrary) ordering. In some contexts, such as enumerative combinatorics, the term enumeration is used more in the sense of counting – with emphasis on determination of the number of elements that a set contains, rather than the production of an explicit listing of those elements.

Snippet from Wikipedia: Class (computer programming)

In object-oriented programming, a class is an extensible program-code-template for creating objects, providing initial values for state (member variables) and implementations of behavior (member functions or methods).

When an object is created by a constructor of the class, the resulting object is called an instance of the class, and the member variables specific to the object are called instance variables, to contrast with the class variables shared across the class.

In some programming languages, classes are a compile time feature only (new classes cannot be declared at runtime). In other languages, classes are first-class citizens, and are generally objects (typically of type Class or similar). In these languages, a class that creates classes within itself is called a metaclass.


© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


enumerated_class.txt · Last modified: 2024/04/28 03:39 (external edit)