Interface HolderSet
public interface HolderSet
Set of ids that either holds a string tag key or an array of ids.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
hasIds()
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
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.tagKey()
Gets the tag key.
-
Method Details
-
of
Creates a new holder set for the given tag.- Parameters:
tagKey
- the tag key- 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
-
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
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
-