public class NewsSummary extends Object implements Serializable, Comparable<NewsSummary>
Modifier and Type | Field and Description |
---|---|
static int |
MAX_TITLE_LENGTH
Maximum length of title string.
|
static String |
MESSAGE_SYMBOL |
Constructor and Description |
---|
NewsSummary(NewsKey key,
String sourceId,
long time,
String title,
String source,
Map<String,Collection<String>> tags) |
Modifier and Type | Method and Description |
---|---|
void |
assignKey(NewsKey key) |
int |
compareTo(NewsSummary o) |
boolean |
equals(Object o) |
NewsKey |
getKey()
Returns news key for identifying news.
|
String |
getOptionalTag(String tag) |
String |
getRequiredTag(String tag) |
String |
getSource()
Returns news source provider.
|
String |
getSourceId()
Returns external ID assigned by news provider.
|
Collection<String> |
getSymbols()
Returns set of instrument symbols for this news.
|
Set<String> |
getTagNames()
Returns set of tags available for the news
|
Collection<String> |
getTagValues(String tag)
Returns values for the specified tag, or null if not found.
|
long |
getTime()
Returns news time.
|
String |
getTitle()
Returns news title.
|
int |
hashCode() |
static NewsSummary |
removeTags(NewsSummary summary,
Collection<String> removeTags) |
static NewsSummary |
retainTags(NewsSummary summary,
Collection<String> retainTags) |
String |
toString() |
public static final String MESSAGE_SYMBOL
public static final int MAX_TITLE_LENGTH
public static NewsSummary removeTags(NewsSummary summary, Collection<String> removeTags)
public static NewsSummary retainTags(NewsSummary summary, Collection<String> retainTags)
public NewsKey getKey()
public void assignKey(NewsKey key)
public String getSourceId()
public long getTime()
public String getTitle()
public String getSource()
public Set<String> getTagNames()
public Collection<String> getTagValues(String tag)
tag
- tag name.public Collection<String> getSymbols()
public int compareTo(NewsSummary o)
compareTo
in interface Comparable<NewsSummary>
Copyright © 2021 Devexperts. All Rights Reserved.