CommentablePostJavadoc

code format="java" package faceplace;

/**
 * Extends the Post class by allowing a Post to have comments. This is
 * used on the faceplace site as the main wall post which display
 * comments below it.
 * @author David

import java.util.Date; import java.lang.Long;

public class CommentablePost extends Post {

private ArrayList comments; private int numComments;

CommentablePost(String text, User author) {

}

/** public ArrayList getComments { return comments; }
 * Returns all of the comments that have been made on
 * the CommentablePost. This is an ArrayList of Posts.
 * @returns an ArrayList of Post objects that represent all
 * comments made on the CommentablePost that holds
 * them.

/** public void addComment(String text, User author) {
 * Add a comment to the CommentablePost. This adds
 * a new Post object to the ArrayList of Post objects that
 * CommentablePost holds to represent comments
 * made on it.
 * @params text a String containing the text of the new Post
 * to be added as a comment.
 * @params author a User who is creating the new Post.

}

/** public void deleteComment(int index) {
 * Removes a Post from the ArrayList of comments at
 * a specific index.
 * @params index an int that specifies where in the ArrayList
 * the Post to be deleted is located.

}

/** public int getNumComments { return numComments; }
 * Returns the number of Post objects in the ArrayList that
 * represents comments on the CommentablePost.
 * @returns an int representing the number of Post objects
 * in the ArrayList of comments.

/** public String display {
 * Returns a String containing the HTML formatted text for
 * display a CommentablePost and all it's comments.
 * @returns a String with HMTML formatting that can be
 * printed out in a JSP to represent a CommentablePost
 * on a website. This is specifically for the faceplace webapp.

}

}

code