Diffusion Apple API
5.9.24
Unified Client Library for iOS, OS X and tvOS
|
Number field metadata describes a data item that can have a numerical value.
A number field metadata object is immutable.
Default multiplicity is defined by the defaultMultiplicity
class method on PTDiffusionMultiplicity.
Class Methods | |
(NSUInteger) | + defaultScale |
(NSDecimalNumber *) | + defaultDefaultValue |
Class Methods inherited from PTDiffusionFieldMetadata | |
(PTDiffusionStringFieldMetadata *) | + defaultMetadata |
(PTDiffusionStringFieldMetadata *) | + stringWithName: |
(PTDiffusionStringFieldMetadata *) | + stringWithName:multiplicity: |
(PTDiffusionStringFieldMetadata *) | + stringWithName:defaultValue:multiplicity: |
(PTDiffusionNumberFieldMetadata *) | + numberWithName: |
(PTDiffusionNumberFieldMetadata *) | + numberWithName:multiplicity: |
(PTDiffusionNumberFieldMetadata *) | + numberWithName:scale: |
(PTDiffusionNumberFieldMetadata *) | + numberWithName:multiplicity:scale: |
(PTDiffusionNumberFieldMetadata *) | + numberWithName:defaultValue:multiplicity:scale: |
Properties | |
NSNumber * | defaultValue |
NSUInteger | scale |
Properties inherited from PTDiffusionFieldMetadata | |
Class< NSObject, NSCopying, NSSecureCoding > | valueClass |
Properties inherited from PTDiffusionMetadata | |
NSString * | name |
PTDiffusionMultiplicity * | multiplicity |
Instance Methods | |
(instancetype) | - initWithName:multiplicity:scale: |
(instancetype) | - initWithName:defaultValue:multiplicity:scale: |
(BOOL) | - isEqualToNumberFieldMetadata: |
Instance Methods inherited from PTDiffusionFieldMetadata | |
(BOOL) | - isEqualToFieldMetadata: |
Instance Methods inherited from PTDiffusionMetadata | |
(BOOL) | - isEqualToMetadata: |
+ (NSDecimalNumber *) defaultDefaultValue |
The default value used if one is not explicitly specified on initialisation.
+ (NSUInteger) defaultScale |
The default scale. It has a value of zero (0
), which constrains values to integer.
- (instancetype) initWithName: | (NSString *) | name | |
defaultValue: | (nullable NSNumber *) | defaultValue | |
multiplicity: | (PTDiffusionMultiplicity *) | multiplicity | |
scale: | (NSUInteger) | scale | |
Returns a number field metadata object initialized with the given name, given default value, given scale and given multiplicity.
name | The name to use. It is used when looking up fields that have been transformed using the receiver. |
defaultValue | The default value that required occurrences of the field should be initialized to. Specifying nil for this argument uses a value equivalent to the number 0.0 (as specified by the defaultDefaultValue class method). |
multiplicity | The multiplicity to use. It governs how many fields can be transformed using the receiver from the enclosing record. |
scale | The scale to use. It governs how many digits lie to the right of the decimal point. A value of zero (0 ) constrains transformed fields to integer values. |
NSInvalidArgumentException | If either the given name or multiplicity is nil . |
- (instancetype) initWithName: | (NSString *) | name | |
multiplicity: | (PTDiffusionMultiplicity *) | multiplicity | |
scale: | (NSUInteger) | scale | |
Returns a number field metadata object initialized with the given name, given scale and given multiplicity.
name | The name to use. It is used when looking up fields that have been transformed using the receiver. |
multiplicity | The multiplicity to use. It governs how many fields can be transformed using the receiver from the enclosing record. |
scale | The scale to use. It governs how many digits lie to the right of the decimal point. A value of zero (0 ) constrains transformed fields to integer values. |
NSInvalidArgumentException | If either the given name or multiplicity is nil . |
- (BOOL) isEqualToNumberFieldMetadata: | (nullable PTDiffusionNumberFieldMetadata *) | numberFieldMetadata |
Compares the receiver to the given number field metadata.
numberFieldMetadata | The number field metadata object with which to compare the receiver. |
YES
if the number field metadata is equal to the receiver, otherwise NO
.
|
readnonatomicassign |
The default value that required occurrences of the field should be initialized to.
|
readnonatomicassign |
The scale for fields transformed using the receiver, being the number of digits to the right of the decimal point.
A value of zero (0
) constrains fields to integer values.