Interface HolderSet
public interface HolderSet
Set of ids that either holds a string tag key or an array of ids.
-
Method Summary
Modifier and TypeMethodDescriptionstatic HolderSetbooleanhasIds()Returns whether this holder set has direct ids.booleanReturns whether this holder set has a tag key.int[]ids()Gets the direct ids.static HolderSetof(int[] ids) Creates a new holder set for the given ids.static HolderSetCreates 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.tagKey()Gets the tag key, not including '#'.
-
Method Details
-
of
Creates a new holder set for the given tag.- Parameters:
tagKey- the tag key, not including '#'- Returns:
- a new holder set
-
of
Creates a new holder set for the given ids.- Parameters:
ids- the direct ids- Returns:
- a new holder set
-
fromTag
-
tagKey
String tagKey()Gets the tag key, not including '#'.- Returns:
- the tag key without a '#'
- 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
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
-