org.newsml.toolkit
Interface CommentNode

All Known Subinterfaces:
ContentItem, Copyright, NewsComponent, NewsItem, NewsItemRef, PartyList, SourceList, Topic, TopicSet, TopicSetRef

public interface CommentNode

Interface for nodes with comments.

All node types that can have comments attached implement this interface.

Version:
2.0
Author:
Reuters PLC

Method Summary
 Comment[] getComment()
          Get all Comment children in an array.
 Comment getComment(int i)
          Get one of the comments attached to this node.
 int getCommentCount()
          Count the comments attached to this node.
 

Method Detail

getCommentCount

public int getCommentCount()
Count the comments attached to this node.
Returns:
The number of comments.

getComment

public Comment getComment(int i)
Get one of the comments attached to this node.
Parameters:
index - The index of the comment.
Returns:
The comment, or null if none was provided at the specified index.

getComment

public Comment[] getComment()
Get all Comment children in an array.
Returns:
A (possibly-empty) array of Comment children.