Interface HolderSet


public interface HolderSet
Set of ids that either holds a string tag key or an array of ids.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether this holder set has direct ids.
    boolean
    Returns whether this holder set has a tag key.
    int[]
    ids()
    Gets the direct ids.
    static HolderSet
    of(int[] ids)
    Creates a new holder set for the given ids.
    static HolderSet
    of(String tagKey)
    Creates a new holder set for the given tag.
    rewrite(it.unimi.dsi.fastutil.ints.Int2IntFunction idRewriter)
    Returns a new holder set with the ids rewritten.
    Gets the tag key.
  • Method Details

    • of

      static HolderSet of(String tagKey)
      Creates a new holder set for the given tag.
      Parameters:
      tagKey - the tag key
      Returns:
      a new holder set
    • of

      static HolderSet of(int[] ids)
      Creates a new holder set for the given ids.
      Parameters:
      ids - the direct ids
      Returns:
      a new holder set
    • tagKey

      String tagKey()
      Gets the tag key.
      Returns:
      the tag key
      See Also:
    • hasTagKey

      boolean hasTagKey()
      Returns whether this holder set has a tag key.
      Returns:
      true if this holder set has a tag key, false if it has direct ids
    • ids

      int[] ids()
      Gets the direct ids.
      Returns:
      direct ids
      See Also:
    • hasIds

      boolean hasIds()
      Returns whether this holder set has direct ids.
      Returns:
      true if this holder set has direct ids, false if it has a tag key
    • rewrite

      HolderSet rewrite(it.unimi.dsi.fastutil.ints.Int2IntFunction idRewriter)
      Returns a new holder set with the ids rewritten.
      Parameters:
      idRewriter - the id rewriter
      Returns:
      a new holder set with the ids rewritten, or self if it has a tag key