public static final class TrailItemSet.None 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 |
NONE
An empty set
|
Constructor and Description |
---|
None() |
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.
|
public static final TrailItemSet NONE
public boolean contains(ItemIdentity id)
TrailItemSet
contains
in class TrailItemSet
id
- item ID@NotNull public TrailItemSet expand(@Nullable 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
public void accept(@NotNull TrailItemSet.Visitor visitor)
TrailItemSet
accept
in class TrailItemSet
Copyright © 2016 ALM Works. All Rights Reserved.