public static final class TrailItemSet.AllItems extends TrailItemSet
TrailItemSet.AllItems, TrailItemSet.Collector, TrailItemSet.None, TrailItemSet.OneItem, TrailItemSet.OneType, TrailItemSet.ReadVisitor, TrailItemSet.SpecificItems, TrailItemSet.SpecificTypes, TrailItemSet.Visitor
Modifier and Type | Field and Description |
---|---|
static TrailItemSet |
ALL_ITEMS |
Constructor and Description |
---|
AllItems() |
Modifier and Type | Method and Description |
---|---|
void |
accept(TrailItemSet.Visitor visitor)
Allows the caller to perform per-subclass actions.
|
boolean |
contains(ItemIdentity id)
Checks if the set contains the given item.
|
TrailItemSet |
expand(ItemIdentity trailItem)
Expands the set to include the given item.
|
TrailItemSet |
expand(TrailItemSet trailItemSet)
Expands the set to include the given items.
|
equals, fromValues, hashCode, isEmpty, of, ofTypes, toString
public static final TrailItemSet ALL_ITEMS
public boolean contains(ItemIdentity id)
TrailItemSet
contains
in class TrailItemSet
id
- item ID@NotNull public TrailItemSet expand(ItemIdentity trailItem)
TrailItemSet
Expands the set to include the given item. The result of this operation is a new set, which a) includes everything this set includes, b) includes given item.
Note that the resulting set may contain more items, due to escalation to a more wide set class. If you expand a set by a sufficient number of items, it will switch to be type-based set, which will contain all items of the given types.
expand
in class TrailItemSet
trailItem
- item to add to the settrailItem
@NotNull public TrailItemSet expand(@Nullable TrailItemSet trailItemSet)
TrailItemSet
Expands the set to include the given items. The result of this operation is a set, which includes everything both this set and parameter set.
Note that the resulting set may contain more items, due to escalation to a more wide set class. If you expand a set by a sufficient number of items, it will switch to be type-based set, which will contain all items of the given types.
expand
in class TrailItemSet
trailItemSet
- item set to add to this settrailItem
public void accept(@NotNull TrailItemSet.Visitor visitor)
TrailItemSet
accept
in class TrailItemSet
Copyright © 2019 ALM Works. All Rights Reserved.