Child class

Abstract type

Class

Abstract type

inner

options  Object

Options for constructor.

Properties

Name Type Optional Description

fireReplace

boolean

Yes

Fire replace:item.

fireAddRemoveOnReplace

boolean

Yes

Fire add:item and remove:item on replacing an item.

appendOnReplace

boolean

Yes

Append item to the end, if item is replaced.

sortFunction

(undefined or function())

Yes

Sort function to sort the collection list.

emptyObjectMaker

(undefined or function())

Yes

Function that returns an empty Unique-Object or an instance of a child class.

Events

add:item

Triggered on adding item to collection.

Parameter

Name Type Optional Description

item

module:meteoJS/base/unique.Unique

 

Added item.

remove:item

Triggered on removing item from collection.

Parameter

Name Type Optional Description

item

module:meteoJS/base/unique.Unique

 

Removed item.

replace:item

Triggered on replacing item with already existing ID.

Parameters

Name Type Optional Description

item

module:meteoJS/base/unique.Unique

 

Added item.

removedItem

module:meteoJS/base/unique.Unique

 

Replaced and removed item.