Top Description Fields Constructors Methods
org.snakeyaml.engine.v2.events

public final Class CommentEvent

extends Event
Class Inheritance
Imports
java.util.Objects, .Optional, org.snakeyaml.engine.v2.comments.CommentType, org.snakeyaml.engine.v2.exceptions.Mark

Marks a comment block value.

Field Summary

Modifier and TypeField and Description
private final CommentType
private final String

Constructor Summary

AccessConstructor and Description
public
CommentEvent(CommentType type, String value, Optional<Mark> startMark, Optional<Mark> endMark)

Method Summary

Modifier and TypeMethod and Description
public CommentType

Returns:

the commentType.
getCommentType
()

The comment type.

public Event.ID
getEventId()

Implements abstract org.snakeyaml.engine.v2.events.Event.getEventId.

Get the type (kind) if this Event

public String

Returns:

Value a comment line string without the leading '#' or a blank line.
getValue
()

String representation of the value.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.snakeyaml.engine.v2.events.Event:
getEndMarkgetStartMark

Field Detail

typeback to summary
private final CommentType type
valueback to summary
private final String value

Constructor Detail

CommentEventback to summary
public CommentEvent(CommentType type, String value, Optional<Mark> startMark, Optional<Mark> endMark)

Method Detail

getCommentTypeback to summary
public CommentType getCommentType()

The comment type.

Returns:CommentType

the commentType.

getEventIdback to summary
public Event.ID getEventId()

Implements abstract org.snakeyaml.engine.v2.events.Event.getEventId.

Doc from org.snakeyaml.engine.v2.events.Event.getEventId.

Get the type (kind) if this Event

Annotations
@Override
getValueback to summary
public String getValue()

String representation of the value.

Without quotes and escaping.

Returns:String

Value a comment line string without the leading '#' or a blank line.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override