StringKpaPrimitive

Abstract base class for KpaPrimitive implementations that always represent a plain string value.

All type predicates except isString are hard-wired to false; all non-string accessors return null. Subclasses need only provide content — the string to expose — and KpaPrimitive is fully implemented.

Typical use: adapter-specific leaf nodes that carry only a string payload (attribute values, text nodes, CSV cells, etc.) extend this class and override content to return the appropriate string.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
override val booleanOrNull: Boolean?

Always null.

Link copied to clipboard
override val doubleOrNull: Double?

Always null.

Link copied to clipboard
override val isBoolean: Boolean

Always false.

Link copied to clipboard
override val isNull: Boolean

Always false.

Link copied to clipboard
override val isNumber: Boolean

Always false.

Link copied to clipboard
override val isString: Boolean

Always true.

Link copied to clipboard
override val longOrNull: Long?

Always null.

Link copied to clipboard
override val stringOrNull: String?

Returns content.

Functions

Link copied to clipboard
override fun renderedString(): String

Returns content.

Link copied to clipboard
inline fun <B : Any> KpaElement.requireBacking(libraryName: String): B

Unwraps this KpaElement to its native backing value of type B, or throws if this element is not a BackedKpaElement whose backing is of type B.