Diffusion Apple API  5.9.24
Unified Client Library for iOS, OS X and tvOS
 All Classes Functions Variables Properties Pages
Class Methods | Properties | Instance Methods | List of all members
PTDiffusionNumberFieldMetadata Class Reference

Introduction

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.

See Also
PTDiffusionRecordMetadata
Since
5.6
Inheritance diagram for PTDiffusionNumberFieldMetadata:
PTDiffusionFieldMetadata PTDiffusionMetadata

Class Methods

(NSUInteger) + defaultScale
 
(NSDecimalNumber *) + defaultDefaultValue
 

Properties

NSNumber * defaultValue
 
NSUInteger scale
 

Instance Methods

(instancetype) - initWithName:multiplicity:scale:
 
(instancetype) - initWithName:defaultValue:multiplicity:scale:
 
(BOOL) - isEqualToNumberFieldMetadata:
 

Method Documentation

+ (NSDecimalNumber *) defaultDefaultValue

The default value used if one is not explicitly specified on initialisation.

Returns
A decimal number object equivalent to the number 0.0.
Since
5.7.1
+ (NSUInteger) defaultScale

The default scale. It has a value of zero (0), which constrains values to integer.

Since
5.6
- (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.

Parameters
nameThe name to use. It is used when looking up fields that have been transformed using the receiver.
defaultValueThe 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).
multiplicityThe multiplicity to use. It governs how many fields can be transformed using the receiver from the enclosing record.
scaleThe 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.
Exceptions
NSInvalidArgumentExceptionIf either the given name or multiplicity is nil.
Since
5.7.1
- (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.

Parameters
nameThe name to use. It is used when looking up fields that have been transformed using the receiver.
multiplicityThe multiplicity to use. It governs how many fields can be transformed using the receiver from the enclosing record.
scaleThe 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.
Exceptions
NSInvalidArgumentExceptionIf either the given name or multiplicity is nil.
Since
5.6
- (BOOL) isEqualToNumberFieldMetadata: (nullable PTDiffusionNumberFieldMetadata *)  numberFieldMetadata

Compares the receiver to the given number field metadata.

Parameters
numberFieldMetadataThe number field metadata object with which to compare the receiver.
Returns
YES if the number field metadata is equal to the receiver, otherwise NO.
Since
5.6

Property Documentation

- (NSNumber*) defaultValue
readnonatomicassign

The default value that required occurrences of the field should be initialized to.

Since
5.7.1
- (NSUInteger) scale
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.

Since
5.6