Top Description Fields Constructors Methods
org.yaml.snakeyaml.comments

public Class CommentLine

extends Object
Class Inheritance
Imports
org.yaml.snakeyaml.error.Mark, org.yaml.snakeyaml.events.CommentEvent

A comment line. It may be a block comment, blank line, or inline comment.

Field Summary

Modifier and TypeField and Description
private final CommentType
private final Mark
private final Mark
private final String

Constructor Summary

AccessConstructor and Description
public
CommentLine(CommentEvent
- the source
event
)

Create

public
CommentLine(Mark
- start
startMark
,
Mark
- end
endMark
,
String
- text
value
,
CommentType
- kind
commentType
)

Create

Method Summary

Modifier and TypeMethod and Description
public CommentType

Returns:

kind
getCommentType
()

Getter

public Mark

Returns:

end
getEndMark
()

getter

public Mark

Returns:

start
getStartMark
()

getter

public String

Returns:

comment's value.
getValue
()

Value of this comment.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

commentTypeback to summary
private final CommentType commentType
endMarkback to summary
private final Mark endMark
startMarkback to summary
private final Mark startMark
valueback to summary
private final String value

Constructor Detail

CommentLineback to summary
public CommentLine(CommentEvent event)

Create

Parameters
event:CommentEvent

- the source

CommentLineback to summary
public CommentLine(Mark startMark, Mark endMark, String value, CommentType commentType)

Create

Parameters
startMark:Mark

- start

endMark:Mark

- end

value:String

- text

commentType:CommentType

- kind

Method Detail

getCommentTypeback to summary
public CommentType getCommentType()

Getter

Returns:CommentType

kind

getEndMarkback to summary
public Mark getEndMark()

getter

Returns:Mark

end

getStartMarkback to summary
public Mark getStartMark()

getter

Returns:Mark

start

getValueback to summary
public String getValue()

Value of this comment.

Returns:String

comment's value.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.