EnumValue

open class EnumValue : DataValue

Encapsulates an OData enum value.

Constructors

Link copied to clipboard
constructor(num: Long, str: String, type: EnumType)
constructor(num: Long, str: String, type: EnumType, name: String?)

For internal use only.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val dataType: DataType
Link copied to clipboard
open val enumType: EnumType
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var label: String
Link copied to clipboard
open val name: String
Link copied to clipboard
Link copied to clipboard
open val value: DataValue

Functions

Link copied to clipboard
open fun byteValue(): Byte

Return the numeric value of this enum value as a byte.

Link copied to clipboard
open override fun copyMutable(): DataValue

Return a clone of this value if it (together with all value subcomponents) is possibly mutable, or return this value if it (together with all value subcomponents) is definitely immutable. The resulting value might share mutable metadata with this query.

Link copied to clipboard

Lookup an existing annotation by term name, or throw an exception if the annotation is not found.

See Also:

{@link com.sap.cloud.mobile.kotlin.odata.EnumValue#annotations EnumValue.annotations} and {@link com.sap.cloud.mobile.kotlin.odata.AnnotationMap#get(kotlin.String) AnnotationMap.get}, for looking up annotations that might not exist.

Link copied to clipboard
open fun intValue(): Int

Return the numeric value of this enum value as an int.

Link copied to clipboard
open fun longValue(): Long

Return the numeric value of this enum value as a long.

Link copied to clipboard
open fun shortValue(): Short

Return the numeric value of this enum value as a short.

Link copied to clipboard
open fun stringValue(): String

Return this enum value as a string.

Link copied to clipboard
open override fun toString(): String

Convert this data value to a string. If the {@link com.sap.cloud.mobile.kotlin.odata.EnumValue#dataType EnumValue.dataType} is defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used. JSON format is used for structured values (arrays and objects).