public class ContentCardsUpdatedEvent
extends java.lang.Object
Constructor and Description |
---|
ContentCardsUpdatedEvent(java.util.List<Card> contentCards,
java.lang.String userId,
long timestampSeconds,
boolean isFromOfflineStorage) |
Modifier and Type | Method and Description |
---|---|
java.util.List<Card> |
getAllCards() |
int |
getCardCount() |
static ContentCardsUpdatedEvent |
getEmptyUpdate() |
long |
getLastUpdatedInSecondsFromEpoch() |
int |
getUnviewedCardCount() |
java.lang.String |
getUserId() |
boolean |
isEmpty() |
boolean |
isFromOfflineStorage() |
boolean |
isTimestampOlderThan(long ageSeconds) |
java.lang.String |
toString() |
public ContentCardsUpdatedEvent(java.util.List<Card> contentCards, java.lang.String userId, long timestampSeconds, boolean isFromOfflineStorage)
contentCards
- The list of cardsuserId
- The user id for this updatetimestampSeconds
- The timestamp of the event, in secondsisFromOfflineStorage
- Whether this update came from
offline storage or a server updatepublic boolean isFromOfflineStorage()
public java.util.List<Card> getAllCards()
List
of all cards. Note that a shallow copy is
returned on every call.public java.lang.String getUserId()
public int getCardCount()
public int getUnviewedCardCount()
public boolean isEmpty()
public long getLastUpdatedInSecondsFromEpoch()
public boolean isTimestampOlderThan(long ageSeconds)
ageSeconds
- The checked against age, in seconds.getLastUpdatedInSecondsFromEpoch()
is older than the age.public java.lang.String toString()
toString
in class java.lang.Object
public static ContentCardsUpdatedEvent getEmptyUpdate()
ContentCardsUpdatedEvent
for an unidentified
user, at the current time, from the SDK cache.