SetBase

abstract class SetBase : DataValue

Base class for strongly-typed sets.

Inheritors

Constructors

Link copied to clipboard
constructor(capacity: Int)

Construct a new set with a {@link com.sap.cloud.mobile.kotlin.odata.SetBase#size SetBase.size} of zero and specified initial capacity. A set can expand in size beyond its initial capacity, but best performance will be obtained if the initial capacity is close to (and not less than) the set's maximum size.

Properties

Link copied to clipboard
open override val dataType: DataType
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val size: Int
Link copied to clipboard

Functions

Link copied to clipboard
open fun clear()

Remove all values from this set.

Link copied to clipboard
open fun makeImmutable()

Mark this set as immutable. Subsequent attempts to mutate the set will throw an {@link com.sap.cloud.mobile.kotlin.odata.core.ImmutableException}.

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.SetBase#dataType SetBase.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).