module:baja/tag/TagSet

module:baja/tag/TagSet

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

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

    This implementation is a simple collection.

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

An array of tags.

Methods

contains(id) → {Boolean}

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

Source:
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) → {*|null}

Description:
  • Return the value for the specified tag.

Source:
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.

Type
* | null

getAll() → {Array.<module:baja/tag/Tag>}

Description:
  • Returns a copy of the contained Tags array.

Source:
Returns:

An array of Tag objects.

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

isEmpty() → {Boolean}

Source:
Returns:

Returns true if there are no Tag objects.

Type
Boolean