Interface TagGroup<T>

interface TagGroup<T> {
    name: string;
    addCommonObject(obj: T, ...tags: string[]): void;
    addTagFactory(factory: TagFactory<T>): void;
    addTags(obj: T, tags: Collection<string>): void;
    addTagsFor(obj: T, ...tags: string[]): void;
    getAllWhere(predicate: TagPredicate<T>): List<T>;
    getAllWithTag(tag: string): List<T>;
    getAllWithTags(tags: Collection<string>): List<T>;
    getTags(obj: T): HashSet<string>;
    removeCommonObject(obj: T): void;
    removeTagsFor(obj: T, ...tags: string[]): void;
}

Type Parameters

  • T = any

Methods

  • Appends object to group to use in iterator and filtering functions like TagGroup.getAllWhere, etc.

    Parameters

    • obj: T
    • Rest...tags: string[]

      primary tags to be added for object

    Returns void

  • Tag factory determines additional tags, which should be added for specific object in group.

    Parameters

    Returns void

  • Fetches object tags and appends it to a present collection in fixed order: primary tags added via TagGroup.addTags, serialized tags from object _tags property, tags added from TagGroup.addTagFactory.

    Parameters

    • obj: T
    • tags: Collection<string>

      collection tor which tags applies

    Returns void

  • Appends primary tags for object; regardless of whether object is in group or not, tags will be added.

    Parameters

    • obj: T
    • Rest...tags: string[]

      primary tags to be added for object

    Returns void

  • Removes primary tags from object.

    Parameters

    • obj: T
    • Rest...tags: string[]

      primary tags to be removed from object

    Returns void

Properties

name: string

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.