Compartilhar via


Protocol SPXPropertyCollection

Declaration

@protocol SPXPropertyCollection

Represents a collection of properties and their values.

Methods

getPropertyByName:

Returns the property value. If the name is not available, it returns an empty string.

- (NSString * _Nullable)getPropertyByName:(NSString * _Nonnull)name

Parameters

  • name - property name.

Returns

value of the property.

getPropertyByName:defaultValue:

Returns the property value. If the name is not available, it returns the specified default value.

- (NSString * _Nullable)getPropertyByName:(NSString * _Nonnull)name
    defaultValue:(NSString * _Nonnull)defaultValue

Parameters

  • name - property name.
  • defaultValue - default value which is returned if the property is not available in the collection.

Returns

value of the property.

getPropertyById:

Returns the property value. If the specified id is not available, it returns an empty string.

- (NSString * _Nullable)getPropertyById:(SPXPropertyId)propertyId

Parameters

  • propertyId - property id.

Returns

value of the property.

getPropertyById:defaultValue:

Returns the property value. If the specified id is not available, it returns the specified default value.

- (NSString * _Nullable)getPropertyById:(SPXPropertyId)propertyId
    defaultValue:(NSString * _Nonnull)defaultValue

Parameters

  • propertyId - property id.
  • defaultValue - default value which is returned if the property is not available in the collection.

Returns

value of the property.

setPropertyTo:byName:

Sets the property value by name.

- (void)setPropertyTo:(NSString * _Nonnull)value byName:(NSString * _Nonnull)name

Parameters

  • name - property name.
  • value - value of the property.

setPropertyTo:byId:

Sets the property value by property id.

- (void)setPropertyTo:(NSString * _Nonnull)value byId:(SPXPropertyId)propertyId

Parameters

  • propertyId - property id.
  • value - value of the property.