Module: baja/tag/TagSet


new (require("baja/tag/TagSet"))(tags)

Tags is used to store a collection of module:baja/tag/Tag
objects.

This implementation is a simple collection.

Parameters:
Name Type Description
tags Array.<module:baja/tag/Tag>

An array of tags.

Methods


contains(id)

Returns true a Tag with the specified Id (or qname)
is found.

Parameters:
Name Type Description
id String | module:baja/tag/Id

The Id
used for the search. This can be an Id or a qname for an Id.

Returns:

Returns true if found.

Type
Boolean

get(id)

Return the value for the specified tag.

Parameters:
Name Type Description
id String | module:baja/tag/Id

The Id
used for the search. This can be an Id or a qname for an Id.

Returns:

The value for the tag or null if the tag doesn't exist.


getAll()

Returns a copy of the contained Tags array.

Returns:

An array of Tag objects.

Type
Array.<module:baja/tag/Tag>

isEmpty()

Returns:

Returns true if there are no Tag objects.

Type
Boolean