|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.feednread.backend.model.watchestree.WatchSettings
Holds the settings used by a Watch to query the matching
NewsFeedEntries from a NewsFeed. This is done
by creating and compiling a valid regular expression from all contained
WatchSettingsEntries which is afterwards used to match
the contents of NewsFeedEntries.
| Field Summary | |
private List |
entries
Holds the WatchSettingsEntry objects of which the
WatchSettings is composed.
|
private Pattern |
pattern
The Pattern used for matchingNewsFeedEntries
|
| Constructor Summary | |
WatchSettings()
Creates a new WatchSettings instance.
|
|
| Method Summary | |
void |
addEntry(WatchSettingsEntry entry)
Adds the specified WatchSettingsEntry to this
WatchSettings.
|
void |
compile()
Compiles this WatchSettings, i.e. all contained
WatchSettingsEntries into a regular expression against
which the matching of NewsFeedEntries can be done.
|
WatchSettingsEntry[] |
getEntries()
|
List |
match(NewsFeed newsFeed)
Selects all NewsFeedEntry objects from the specified
NewsFeed that match this WatchSettings. |
private boolean |
match(NewsFeedEntry entry)
Determines if the specified NewsFeedEntry matches against
this WatchSettings.
|
private String |
prepare(String str)
Prepares the specified String for regular expression
compilation.
|
void |
removeAllEntries()
Removes all WatchSettingsEntry objects from this
WatchSettings.
|
void |
removeEntry(WatchSettingsEntry entry)
Removes the specified WatchSettingsEntry from this
WatchSettings.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private List entries
Holds the WatchSettingsEntry objects of which the
WatchSettings is composed.
private Pattern pattern
The Pattern used for matchingNewsFeedEntries
| Constructor Detail |
public WatchSettings()
Creates a new WatchSettings instance.
| Method Detail |
public WatchSettingsEntry[] getEntries()
public void addEntry(WatchSettingsEntry entry)
Adds the specified WatchSettingsEntry to this
WatchSettings.
entry - the WatchSettingsEntry to addpublic void removeEntry(WatchSettingsEntry entry)
Removes the specified WatchSettingsEntry from this
WatchSettings.
entry - the WatchSettingsEntry to removepublic void removeAllEntries()
Removes all WatchSettingsEntry objects from this
WatchSettings.
public List match(NewsFeed newsFeed)
Selects all NewsFeedEntry objects from the specified
NewsFeed that match this WatchSettings. If
this WatchSettings has not been compiled yet using the
compile() method this will be done before the matching.
newsFeed - the NewsFeed to match
List that contains all matching
NewsFeedEntry objects from the specified
NewsFeedpublic void compile()
Compiles this WatchSettings, i.e. all contained
WatchSettingsEntries into a regular expression against
which the matching of NewsFeedEntries can be done.
private String prepare(String str)
Prepares the specified String for regular expression
compilation.
str - the String to prepare
Stringprivate boolean match(NewsFeedEntry entry)
Determines if the specified NewsFeedEntry matches against
this WatchSettings.
entry - the NewsFeedEntry to match
true if the specified NewsFeedEntry
matches; false otherwise
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||