public class Snapshot<M extends IBetMatch>
extends java.lang.Object
implements jayeson.lib.feed.api.ISnapshot<M>
| Constructor and Description |
|---|
Snapshot(java.util.Collection<M> matches)
Creates a snapshot from a collection of matches.
|
Snapshot(java.util.Map<SportType,java.util.Collection<M>> matchesBySport)
Creates a snapshot from a mapping of a SportType to a collection of matches.
|
Snapshot(java.util.Map<java.lang.String,M> matches,
boolean createNewMap)
Creates a snapshot from a mapping of a match id to a match.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasMatch(java.lang.String matchId)
Check if the snapshot contains particular match given the match ID.
|
M |
match(java.lang.String matchId)
Retrieve a specific match with the particular matchId
|
java.util.Collection<M> |
matches()
Get all matches of the current snapshot
|
java.util.Collection<M> |
matches(SportType type)
Return matches of certain sport type
|
java.util.Map<SportType,java.util.Collection<M>> |
matchesBySport() |
<T extends M> |
matchesOfSport(SportType type) |
java.util.Collection<SportType> |
sports() |
public Snapshot(java.util.Collection<M> matches)
matches - collection of matchespublic Snapshot(java.util.Map<java.lang.String,M> matches, boolean createNewMap)
matches - - Map of match ids to matches.createNewMap - - True to clone the map, false to use the same map.public java.util.Collection<M> matches()
public java.util.Collection<SportType> sports()
public boolean hasMatch(java.lang.String matchId)
jayeson.lib.feed.api.ISnapshotpublic M match(java.lang.String matchId)
jayeson.lib.feed.api.ISnapshot