ProblemArray

A JSON array as an extension value. Implements List<ProblemValue> by delegation, so it can be iterated and indexed directly.

In XML this becomes a sequence of children all named i (Appendix B), where an empty array is indistinguishable from an empty object and from null; all three read back as the empty string. See the problem-details-xml module documentation.

Constructors

Link copied to clipboard
constructor(items: List<ProblemValue>)

Properties

Link copied to clipboard

The scalar parsed as a Boolean.

Link copied to clipboard

The scalar parsed as a Boolean, or null if this value is not a scalar or is not true/false.

Link copied to clipboard

The scalar parsed as a Double. Reads the wire literal, so a quoted "1.5" also returns 1.5.

Link copied to clipboard

The scalar parsed as a Double, or null if this value is not a scalar or does not parse.

Link copied to clipboard

The scalar parsed as an Int.

Link copied to clipboard

The scalar parsed as an Int, or null if this value is not a scalar or does not parse.

Link copied to clipboard

The scalar parsed as a Long. Reads the wire literal, so a quoted "30" also returns 30.

Link copied to clipboard

The scalar parsed as a Long, or null if this value is not a scalar or does not parse.

Link copied to clipboard

This value as a scalar.

Link copied to clipboard

This value as a scalar, or null if it is an array, an object or ProblemNull.

Link copied to clipboard

This value as an array.

Link copied to clipboard

This value as an array, or null if it is anything else.

Link copied to clipboard

This value as an object.

Link copied to clipboard

This value as an object, or null if it is anything else.

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

The scalar's wire literal as text, with the quotes of a JSON string already removed.

Link copied to clipboard

The scalar's wire literal as text, or null if this value is not a scalar.

Functions

Link copied to clipboard
open operator override fun contains(element: ProblemValue): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<ProblemValue>): Boolean
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Compares the contained values against any List, not only another ProblemArray. List equality requires that of a class implementing it, and it keeps ProblemArray(items) == items true.

Link copied to clipboard
open operator override fun get(index: Int): ProblemValue
Link copied to clipboard
open override fun hashCode(): Int

The contained list's own hash, so an equal plain List hashes the same.

Link copied to clipboard
open override fun indexOf(element: ProblemValue): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<ProblemValue>
Link copied to clipboard
open override fun lastIndexOf(element: ProblemValue): Int
Link copied to clipboard
open override fun listIterator(): ListIterator<ProblemValue>
open override fun listIterator(index: Int): ListIterator<ProblemValue>
Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<ProblemValue>
Link copied to clipboard
open override fun toString(): String

The array as it would be written to a JSON document.