Property

interface Property<T>(source)

Represents a strongly-typed configuration property.

Properties are key-value pairs that provide a way to manage configuration settings separately from feature flags. While feature flags are typically boolean (on/off), properties can hold values of various types (String, Int, Boolean, etc.).

Use Cases

  • Configuration: API URLs, timeouts, connection limits

  • Feature Metadata: Additional context for feature flags (e.g., threshold for a rollout)

  • Business Logic: Pricing parameters, tax rates, localized strings

Capabilities

  • Type Safety: Properties are strongly typed

  • Fixed Values: Can constrain values to a specific set (enum-like behavior)

  • Immutability: Properties are immutable value objects

  • Serialization: Built-in support for JSON serialization

Parameters

T

The type of the property value.

Inheritors

Properties

Link copied to clipboard
abstract val description: String?

Optional human-readable description of the property.

Link copied to clipboard
abstract val fixedValues: Set<T>

Set of allowed values. If not empty, the property value must be one of these values.

Link copied to clipboard

Checks if this property has fixed values defined.

Link copied to clipboard
abstract val name: String

Unique name of the property.

Link copied to clipboard
abstract val readOnly: Boolean

Indicates whether this property is read-only. Some stores do not allow property edition.

Link copied to clipboard
abstract val value: T

Current value of the property.