FileDocCategorySizeDatePackage
BoardSummaryImpl.javaAPI DocExample1409Sun Sep 02 14:59:04 BST 2001com.oreilly.forum.fakeimpl

BoardSummaryImpl

public class BoardSummaryImpl extends Object implements BoardSummary

Fields Summary
private long
id
private String
name
private String
description
private List
monthsWithMessages
Constructors Summary
public BoardSummaryImpl(long id, String name, String description)

        this.id = id;
        this.name = name;
        this.description = description;
        this.monthsWithMessages = new ArrayList();
    
Methods Summary
public java.lang.StringgetDescription()

        return this.description;
    
public longgetID()

        return this.id;
    
public java.util.IteratorgetMonthsWithMessages()

        return this.monthsWithMessages.iterator();
    
public java.lang.StringgetName()

        return this.name;
    
public voidmessageAdded(Message msg)

        DayMonthYear createDate = msg.getCreateDate();

        // update the monthsWithMessages list
        Iterator iter = this.monthsWithMessages.iterator();
        while (iter.hasNext()) {
            MonthYear curMonth = (MonthYear) iter.next();
            if (createDate.getMonth() == curMonth.getMonth()
                    && createDate.getYear() == curMonth.getYear()) {
                return;
            }
        }

        this.monthsWithMessages.add(createDate);