| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private final Queue | |
| private final CommentType[] |
| Access | Constructor and Description |
|---|---|
| public | CommentEventsCollector(final Parser
the event source. parser, CommentType... the comment types expected. Any comment types not included are not
collected. expectedCommentTypes)Constructor used to collect comment events emitted by a Parser. |
| public | CommentEventsCollector(Queue<Event>
the event source. eventSource, CommentType... the comment types expected. Any comment types not included are not
collected. expectedCommentTypes)Constructor used to collect events emitted by the Serializer. |
| Modifier and Type | Method and Description |
|---|---|
| public CommentEventsCollector | Returns: this object.Collect all events of the expected type (set during construction) starting with the top event on the event source. |
| public Event | Returns: the event provided as an argument, if it is not collected; Otherwise,nullthe first event to attempt to collect. event)Collect all events of the expected type (set during construction) starting with event provided as an argument and continuing with the top event on the event source. |
| public Event | Returns: the event provided as an argument, if it is not collected; Otherwise, the first event that is not collected.the first event to attempt to collect. event)Collect all events of the expected type (set during construction) starting with event provided as an argument and continuing with the top event on the event source. |
| public List | |
| public boolean | Returns: true if it does; Otherwise, falseTest if the collector contains any collected events. |
| private boolean | Returns: true if the events is a comment of the expected type; Otherwise, false.the event to test. event)Determine if the event is a comment of one of the expected types set during construction. |
| commentLineList | back to summary |
|---|---|
| private List<CommentLine> commentLineList | |
| eventSource | back to summary |
|---|---|
| private final Queue<Event> eventSource | |
| expectedCommentTypes | back to summary |
|---|---|
| private final CommentType[] expectedCommentTypes | |
| CommentEventsCollector | back to summary |
|---|---|
| public CommentEventsCollector(final Parser parser, CommentType... expectedCommentTypes) Constructor used to collect comment events emitted by a Parser.
| |
| CommentEventsCollector | back to summary |
|---|---|
| public CommentEventsCollector(Queue<Event> eventSource, CommentType... expectedCommentTypes) Constructor used to collect events emitted by the Serializer.
| |
| collectEvents | back to summary |
|---|---|
| public CommentEventsCollector collectEvents() Collect all events of the expected type (set during construction) starting with the top event on the event source. Collection stops as soon as a non comment or comment of the unexpected type is encountered.
| |
| collectEvents | back to summary |
|---|---|
| public Event collectEvents(Event event) Collect all events of the expected type (set during construction) starting with event provided as an argument and continuing with the top event on the event source. Collection stops as soon as a non comment or comment of the unexpected type is encountered. | |
| collectEventsAndPoll | back to summary |
|---|---|
| public Event collectEventsAndPoll(Event event) Collect all events of the expected type (set during construction) starting with event provided as an argument and continuing with the top event on the event source. Collection stops as soon as a non comment or comment of the unexpected type is encountered. | |
| consume | back to summary |
|---|---|
| public List Return the events collected and reset the colletor.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Test if the collector contains any collected events.
| |
| isEventExpected | back to summary |
|---|---|
| private boolean isEventExpected(Event event) Determine if the event is a comment of one of the expected types set during construction.
| |