Interface PopContaining

All Known Subinterfaces:
AddEdgeStepContract<S>, AddElementStepContract<S,E>, AddPropertyStepContract<S>, AddVertexStepContract<S>, CallStepContract<S,E>, MergeStepContract<S,E,C>, ReadOnlyTraversalParent, Scoping, TraversalOptionParent<M,S,E>, TraversalParent
All Known Implementing Classes:
AbstractAddEdgeStepPlaceholder, AbstractAddElementStepPlaceholder, AbstractAddVertexStepPlaceholder, AbstractMergeElementStepPlaceholder, AddEdgeStartStep, AddEdgeStartStepPlaceholder, AddEdgeStep, AddEdgeStepPlaceholder, AddLabelStep, AddPropertyStep, AddPropertyStepPlaceholder, AddVertexStartStep, AddVertexStartStepPlaceholder, AddVertexStep, AddVertexStepPlaceholder, AggregateStep, AllStep, AndStep, AnyStep, BranchStep, CallStep, CallStepPlaceholder, ChooseStep, CoalesceStep, CombineStep, ConcatStep, ConnectedComponentVertexProgramStep, ConnectiveStep, DateDiffStep, DedupGlobalStep, DifferenceStep, DisjunctStep, DropLabelsStep, ElementMapStep, EmptyStep, FormatStep, GraphStep, GroupCountSideEffectStep, GroupCountStep, GroupSideEffectStep, GroupStep, HasStep, IndexStep, IntersectStep, IsStep, LocalStep, MatchStep, MatchStep.MatchEndStep, MatchStep.MatchStartStep, MathStep, MergeEdgeStep, MergeEdgeStepPlaceholder, MergeElementStep, MergeStep, MergeVertexStep, MergeVertexStepPlaceholder, NoneStep, NotStep, OptionalStep, OrderGlobalStep, OrderLocalStep, OrStep, PageRankVertexProgramStep, PathFilterStep, PathStep, PeerPressureVertexProgramStep, ProductStep, ProjectStep, PropertyMapStep, RepeatStep, SackValueStep, SampleGlobalStep, SelectOneStep, SelectStep, ShortestPathVertexProgramStep, SplitGlobalStep, SplitLocalStep, TinkerGraphStep, TraversalFilterStep, TraversalFlatMapStep, TraversalMapStep, TraversalSelectStep, TraversalSideEffectStep, TraversalVertexProgramStep, TreeSideEffectStep, TreeStep, UnionStep, WherePredicateStep, WhereTraversalStep, WhereTraversalStep.WhereEndStep, WhereTraversalStep.WhereStartStep

public interface PopContaining
The PopContaining interface is implemented by traversal steps that maintain Pop instructions for label access. It provides a mechanism to track and manage how labeled elements should be accessed using Pop semantics (first, last, all, or mixed). In Gremlin traversals, various elements can be labeled and later accessed via these labels. The Pop enum determines how to access these labeled elements when there are multiple values associated with the same label.
 
 // Simple example with default Pop.last behavior
 gremlin> g.V().as("a").out().as("a").select("a")
 ==>[v[2]]  // returns the last element labeled "a"

 // Using Pop.first to get the first labeled element
 gremlin> g.V().as("a").out().as("a").select(first, "a")
 ==>[v[1]]  // returns the first element labeled "a"

 // Using Pop.all to get all labeled elements
 gremlin> g.V().as("a").out().as("a").select(all, "a")
 ==>[v[1], v[2]]  // returns all elements labeled "a"
 
 
Steps implementing this interface maintain a collection of PopContaining.PopInstruction objects, each containing a label and a Pop value that specifies how to access elements with that label.