Package org.snakeyaml.engine.v2.events
Class CommentEvent
- java.lang.Object
-
- org.snakeyaml.engine.v2.events.Event
-
- org.snakeyaml.engine.v2.events.CommentEvent
-
public final class CommentEvent extends Event
Marks a comment block value.
-
-
Field Summary
Fields Modifier and Type Field Description private CommentType
type
private java.lang.String
value
-
Constructor Summary
Constructors Constructor Description CommentEvent(CommentType type, java.lang.String value, java.util.Optional<Mark> startMark, java.util.Optional<Mark> endMark)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommentType
getCommentType()
The comment type.Event.ID
getEventId()
Get the type (kind) if this Eventjava.lang.String
getValue()
String representation of the value.java.lang.String
toString()
-
Methods inherited from class org.snakeyaml.engine.v2.events.Event
getEndMark, getStartMark
-
-
-
-
Field Detail
-
type
private final CommentType type
-
value
private final java.lang.String value
-
-
Constructor Detail
-
CommentEvent
public CommentEvent(CommentType type, java.lang.String value, java.util.Optional<Mark> startMark, java.util.Optional<Mark> endMark)
-
-
Method Detail
-
getValue
public java.lang.String getValue()
String representation of the value.Without quotes and escaping.
- Returns:
- Value a comment line string without the leading '#' or a blank line.
-
getCommentType
public CommentType getCommentType()
The comment type.- Returns:
- the commentType.
-
getEventId
public Event.ID getEventId()
Description copied from class:Event
Get the type (kind) if this Event- Specified by:
getEventId
in classEvent
- Returns:
- the ID of this Event
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-