CLASS

# RoomleFilter

Contents

  • Methods
    • init(search:elements:values:type:)
    • init(search:objc_elements:objc_values:type:)
    • init()
    • objc_getTargetElements()
    • objc_getTargetValues()
public class RoomleFilter : NSObject

Describes which should be filtered

# Methods

# init(search:elements:values:type:)

public init(search: String, elements : [RoomleFilterTargetElements], values: [RoomleFilterTargetValues], type: RoomleFilterType)

Creates a new filter instance with given search string, given filter target elements and given filter target values

  • parameter search: value which should be looked for
  • parameter elements: an array of all possible elements which should be filtered for. If this filter is only for .catalog, then only catalogs property of RoomleFilterResult will be filled.
  • parameter values: an array of all values which should be filtered for.
  • parameter type: the logic which the filter will execute

# Parameters

Name Description
search value which should be looked for
elements an array of all possible elements which should be filtered for. If this filter is only for .catalog, then only catalogs property of RoomleFilterResult will be filled.
values an array of all values which should be filtered for.
type the logic which the filter will execute

# init(search:objc_elements:objc_values:type:)

public convenience init(search: String, objc_elements : [Int], objc_values : [Int], type: RoomleFilterType)

Initializer for Objective-C has to be done with arrays of integers, because an array of enums is not possible in Objective-C, therefore all integers has to match corresponding enum value in order to be successful called. Successful conversion can be verified with [filter getTargetElements] and [filter getTargetValues]. If all values are 0 in there it indicates, that something went wrong.

  • parameter search: value which should be looked for
  • parameter elements: an array of possible elements which should be filtered for. If this filter is only for 0 (.catalog), then only catalogs property of RoomleFilterResult will be filtered. The integer values has to match corresponding Swift enumeration to work as intented. If a value is not possible it will fallback to .catalog with rawValue = 0
  • parameter values: an array of all values which should be filtered for. The integer values has to match corresponding Swift enumeration to work as intented. If a value is not possible it will fallback to .id with rawValue = 0
  • parameter type: the logic which the filter will execute

# Parameters

Name Description
search value which should be looked for
elements an array of possible elements which should be filtered for. If this filter is only for 0 (.catalog), then only catalogs property of RoomleFilterResult will be filtered. The integer values has to match corresponding Swift enumeration to work as intented. If a value is not possible it will fallback to .catalog with rawValue = 0
values an array of all values which should be filtered for. The integer values has to match corresponding Swift enumeration to work as intented. If a value is not possible it will fallback to .id with rawValue = 0
type the logic which the filter will execute

# init()

public override convenience init()

# objc_getTargetElements()

public func objc_getTargetElements() -> [Int]

Returns array of RoomleFilterTargetElements as Objective-C possible value, which is an array of integers.

# objc_getTargetValues()

public func objc_getTargetValues() -> [Int]

Returns array of RoomleFilterTargetValues as Objective-C possible value, which is an array of integers.