Modifier and Type | Field and Description |
---|---|
private NewsMaker |
NewsStory.newsMaker1
The first news maker featured in the story.
|
private NewsMaker |
NewsStory.newsMaker2
The second news maker featured in the story.
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<NewsMaker> |
NewsMakerList.newsMakers
The list of news makers.
|
Modifier and Type | Method and Description |
---|---|
NewsMaker |
NewsMakerList.get(NewsMaker newsMaker)
An accessor method to get a news maker from the list.
|
NewsMaker |
NewsMakerList.getExactMatch(java.lang.String newsMakerName)
An accessor method to get a news maker from the list based on the exact
name provided.
|
NewsMaker |
NewsStory.getNewsMaker1()
The accessor for the first news maker field.
|
NewsMaker |
NewsStory.getNewsMaker2()
The accessor for the second news maker field.
|
NewsMaker |
NewsMakerList.getPartialMatch(java.lang.String newsMakerName)
An accessor method to get a news maker from the list based on the partial
name provided.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
NewsMakerList.add(NewsMaker newsMaker)
The mutator for adding news makers to the list.
|
int |
NewsMaker.compareTo(NewsMaker newsMaker)
The overridden compareTo method for news makers, which looks just at
name.
|
boolean |
NewsMakerList.contains(NewsMaker newsMaker)
An accessor method to test whether the list already contains a news
maker.
|
static java.lang.String |
UserInterface.createListOfNewsStoriesForNewsmaker(NewsMaker newsMaker,
java.lang.String mediaType,
java.lang.String[] sortCriteria)
This method takes a news maker and turns its list of news stories into a
String formated for display to the user. |
NewsMaker |
NewsMakerList.get(NewsMaker newsMaker)
An accessor method to get a news maker from the list.
|
static void |
UserInterface.reportNewsmakerNotFound(NewsMaker queriedNewsMaker)
This method reports at the console that there were no relevant stories
found.
|
Constructor and Description |
---|
NewspaperStory(java.time.LocalDate date,
java.lang.String sourceName,
int length,
java.lang.String topic,
NewsMaker newsMaker1,
NewsMaker newsMaker2)
The constructor which takes parameters for all of the fields can simply
pass them to the constructor for
NewsStory and let it do the
work. |
NewsStory(java.time.LocalDate date,
java.lang.String source,
int length,
java.lang.String topic,
NewsMaker newsMaker1,
NewsMaker newsMaker2)
The constructor for the class which takes objects of appropriate types to
initialize all of the fields.
|
TVNewsStory(java.time.LocalDate date,
java.lang.String sourceName,
int length,
java.lang.String topic,
NewsMaker newsMaker1,
NewsMaker newsMaker2)
The constructor which takes parameters for all of the fields can simply
pass them to the constructor for
NewsStory and let it do the
work. |