Package org.yaml.snakeyaml.events
Class CommentEvent
- java.lang.Object
-
- org.yaml.snakeyaml.events.Event
-
- org.yaml.snakeyaml.events.CommentEvent
-
public final class CommentEvent extends Event
Marks a comment block value.
-
-
Field Summary
Fields Modifier and Type Field Description private CommentTypetypeprivate java.lang.Stringvalue
-
Constructor Summary
Constructors Constructor Description CommentEvent(CommentType type, java.lang.String value, Mark startMark, Mark endMark)Create
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetArguments()Generate human readable representation of the EventCommentTypegetCommentType()The comment type.Event.IDgetEventId()Get the type (kind) if this Eventjava.lang.StringgetValue()String representation of the value.-
Methods inherited from class org.yaml.snakeyaml.events.Event
equals, getEndMark, getStartMark, hashCode, is, toString
-
-
-
-
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, Mark startMark, Mark endMark)
Create- Parameters:
type- - kindvalue- - textstartMark- - startendMark- - end
-
-
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.
-
getArguments
protected java.lang.String getArguments()
Description copied from class:EventGenerate human readable representation of the Event- Overrides:
getArgumentsin classEvent- Returns:
- representation fore humans
- See Also:
- "__repr__ for Event in PyYAML"
-
getEventId
public Event.ID getEventId()
Description copied from class:EventGet the type (kind) if this Event- Specified by:
getEventIdin classEvent- Returns:
- the ID of this Event
-
-