Interface HasMutableTags

All Superinterfaces:
HasTags
All Known Subinterfaces:
MutableEntityExtended, MutableExternalEntity
All Known Implementing Classes:
MutableEntityExtendedImp, MutableExternalEntityImp

public interface HasMutableTags extends HasTags
The interface defines a mixin and abstracts an entity with tags.
  • Field Summary

    Fields inherited from interface net.tangly.core.HasTags

    TAGS
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(@NotNull Tag tag)
    Add the tag to the collection of tags.
    default void
    addTags(@NotNull Iterable<Tag> tags)
     
    void
     
    default void
    rawTags(String rawTags)
    Set the tags using the canonical string representation.
    boolean
    remove(@NotNull Tag tag)
    Remove the tag from the collection of tags.
    default void
    removeTagNamed(@NotNull String tag)
    Remove the tag with the given tag identification containing optional namespace and tag name.
    void
    tags(@NotNull Collection<Tag> tags)
    Set the new collection of tags for the entity.
    default void
    update(@NotNull String tag, String value)
    Replace or inserts the given tag.
    default boolean
    update(@NotNull Tag tag)
    Replace or insert the given tag.

    Methods inherited from interface net.tangly.core.HasTags

    containsTag, containsTag, findBy, findBy, findByNamespace, rawTags, tags, value, value
  • Method Details

    • tags

      void tags(@NotNull @NotNull Collection<Tag> tags)
      Set the new collection of tags for the entity.
      Parameters:
      tags - new collection of tags
      See Also:
    • remove

      boolean remove(@NotNull @NotNull Tag tag)
      Remove the tag from the collection of tags.
      Parameters:
      tag - tag to remove
      Returns:
      true if this collection contained the specified element
      See Also:
    • add

      boolean add(@NotNull @NotNull Tag tag)
      Add the tag to the collection of tags.
      Parameters:
      tag - tag to be added
      Returns:
      true if this collection did not already contain the specified element
      See Also:
    • clear

      void clear()
    • addTags

      default void addTags(@NotNull @NotNull Iterable<Tag> tags)
    • update

      default boolean update(@NotNull @NotNull Tag tag)
      Replace or insert the given tag. Tag equivalence is detected with optional namespace and tag name.
      Parameters:
      tag - tag to replace or insert
    • update

      default void update(@NotNull @NotNull String tag, String value)
      Replace or inserts the given tag. Tag equivalence is detected with optional namespace and tag name.
      Parameters:
      tag - tag to replace or insert
      value - optional value of the tag
    • removeTagNamed

      default void removeTagNamed(@NotNull @NotNull String tag)
      Remove the tag with the given tag identification containing optional namespace and tag name.
      Parameters:
      tag - tag identification of the tag to be removed
    • rawTags

      default void rawTags(String rawTags)
      Set the tags using the canonical string representation.
      Parameters:
      rawTags - canonical representation of the tag collection
      See Also: