QuantityAnswer
public struct QuantityAnswer : Answer
-
The number that was selected
Declaration
Swift
public let value: Int
-
The identifier of the
Question
Declaration
Swift
public let questionId: String
-
The string represntation of the number
Declaration
Swift
public var codedValue: String { get }
-
Initializes a
QuantityAnswer
given the number andQuestion
- value: The number represnting the answer
question: The
Question
this answers
Throws
AnswerError.unacceptable
if the question is not a quantity type or if the number is less than 0Declaration
Swift
public init(_ value: Int, question: Question) throws
Return Value
A
QuantityAnswer
representing anAnswer
to the quantity type question