|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mycompany.messages.NewsBean
This class maintains a list of NewsItemBean objects. It's only intended as an example. A real implementation would use a database to keep track of the objects instead.
Field Summary | |
private int[] |
idSequence
|
private java.util.List |
newsItems
|
Constructor Summary | |
NewsBean()
Creates a new instance and fills it with a few sample news items. |
Method Summary | |
private void |
addDefaultItems()
Creates sample news items and adds them to the list. |
NewsItemBean[] |
getNewsItems()
Returns an array of all items. |
void |
removeNewsItem(int id)
Removes the news item with the specified id. |
void |
setNewsItem(NewsItemBean newsItem)
Adds a news item to the list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.List newsItems
private int[] idSequence
Constructor Detail |
public NewsBean()
Method Detail |
public NewsItemBean[] getNewsItems()
public void setNewsItem(NewsItemBean newsItem)
public void removeNewsItem(int id)
private void addDefaultItems()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |