public static final class TrailItemSet.SpecificItems extends TrailItemSet
TrailItemSet.AllItems, TrailItemSet.Collector, TrailItemSet.None, TrailItemSet.OneItem, TrailItemSet.OneType, TrailItemSet.ReadVisitor, TrailItemSet.SpecificItems, TrailItemSet.SpecificTypes, TrailItemSet.Visitor| Constructor and Description |
|---|
SpecificItems(Collection<ItemIdentity> items) |
SpecificItems(java.util.stream.Stream<ItemIdentity> stream) |
| 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.
|
Set<ItemIdentity> |
getItems() |
equals, fromValues, hashCode, isEmpty, of, ofTypes, toStringpublic SpecificItems(Collection<ItemIdentity> items)
public SpecificItems(java.util.stream.Stream<ItemIdentity> stream)
public boolean contains(ItemIdentity id)
TrailItemSetcontains in class TrailItemSetid - item ID@NotNull public Set<ItemIdentity> getItems()
@NotNull public TrailItemSet expand(@Nullable ItemIdentity trailItem)
TrailItemSetExpands 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 TrailItemSettrailItem - item to add to the settrailItem@NotNull public TrailItemSet expand(@Nullable TrailItemSet trailItemSet)
TrailItemSetExpands 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 TrailItemSettrailItemSet - item set to add to this settrailItempublic void accept(@NotNull
TrailItemSet.Visitor visitor)
TrailItemSetaccept in class TrailItemSetCopyright © 2019 ALM Works. All Rights Reserved.