-
- All Implemented Interfaces:
-
android.os.Parcelable
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable
,java.util.Collection
,java.util.List
,java.util.RandomAccess
public class MenigaFeed extends ArrayList<MenigaFeedItem> implements Parcelable, Serializable, Cloneable
Copyright 2017 Meniga Iceland Inc.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Parcelable.Creator<MenigaFeed>
CREATOR
protected DateTime
actualEndDate
protected DateTime
from
protected DateTime
to
protected int
page
protected int
itemsPerPage
-
Constructor Summary
Constructors Constructor Description MenigaFeed()
-
Method Summary
Modifier and Type Method Description void
writeToParcel(Parcel dest, int flags)
static void
setOperator(MenigaFeedOperations operator)
Sets the api operator for doing api calls MenigaFeed
clone()
int
describeContents()
boolean
hasMoreData()
boolean
hasMorePages()
boolean
equals(Object o)
int
hashCode()
MenigaFeed
subList(int fromIndex, int toIndex)
static Result<MenigaFeed>
fetch(DateTime from, DateTime to)
Fetches the feed within the given period, ignoring pagination (all entries are returned within the range) static Result<MenigaFeed>
fetch(DateTime from, DateTime to, int page, int itemsPerPage)
Fetches the feed within the given period, ignoring pagination (all entries are returned within the range) static Result<MenigaFeed>
fetch(FeedFilter feedFilter)
Fetches the feed according to the provided FeedFilter Result<MenigaFeed>
appendDays(int numDays)
Fetches and merges items from the feed into this feed object by going numDays into the past Result<MenigaFeed>
appendNextPage()
Appends all the transactions from the next page. Result<MenigaFeed>
nextPage()
Replaces all the items with the items from the next page. Result<MenigaFeed>
prevPage()
Replaces all the items with the items from the previous page. static Result<MenigaScheduledEvent>
fetchScheduledEvent(long id)
DateTime
getActualEndDate()
DateTime
getFrom()
DateTime
getTo()
int
getPage()
int
getItemsPerPage()
void
setActualEndDate(DateTime actualEndDate)
-
Methods inherited from class java.util.ArrayList
add, add, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractList
equals, hashCode
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from class java.util.Collection
parallelStream, stream
-
Methods inherited from class java.lang.Iterable
iterator, spliterator
-
Methods inherited from class java.util.List
of
-
Methods inherited from class android.os.Parcelable
describeContents, writeToParcel
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
setOperator
static void setOperator(MenigaFeedOperations operator)
Sets the api operator for doing api calls
- Parameters:
operator
- An object that implements the MenigaFeedOperations interface for carrying out api operations on this class.
-
clone
MenigaFeed clone()
-
describeContents
int describeContents()
-
hasMoreData
boolean hasMoreData()
-
hasMorePages
boolean hasMorePages()
-
hashCode
int hashCode()
-
subList
@Nonnull() MenigaFeed subList(int fromIndex, int toIndex)
-
fetch
static Result<MenigaFeed> fetch(DateTime from, DateTime to)
Fetches the feed within the given period, ignoring pagination (all entries are returned within the range)
- Parameters:
from
- The start date for the feed, no item in the feed will be older than thisto
- The end date for the feed, no item in the feed will be younger than this
-
fetch
static Result<MenigaFeed> fetch(DateTime from, DateTime to, int page, int itemsPerPage)
Fetches the feed within the given period, ignoring pagination (all entries are returned within the range)
- Parameters:
from
- The start date for the feed, no item in the feed will be older than thisto
- The end date for the feed, no item in the feed will be younger than thispage
- The page index to getitemsPerPage
- Number of results per page
-
fetch
static Result<MenigaFeed> fetch(FeedFilter feedFilter)
Fetches the feed according to the provided FeedFilter
- Parameters:
feedFilter
- The filter to use
-
appendDays
Result<MenigaFeed> appendDays(int numDays)
Fetches and merges items from the feed into this feed object by going numDays into the past
- Parameters:
numDays
- Number of days into the past, beyond the current from date, to fetch new feed data
-
appendNextPage
Result<MenigaFeed> appendNextPage()
Appends all the transactions from the next page. Use hasMorePages to find out if you are on the last page
-
nextPage
Result<MenigaFeed> nextPage()
Replaces all the items with the items from the next page. Use hasMorePages to find out if you are on the last page
-
prevPage
Result<MenigaFeed> prevPage()
Replaces all the items with the items from the previous page. Use getPage to find out if you are on the first page
-
fetchScheduledEvent
static Result<MenigaScheduledEvent> fetchScheduledEvent(long id)
-
getActualEndDate
DateTime getActualEndDate()
-
getFrom
DateTime getFrom()
-
getTo
DateTime getTo()
-
getPage
int getPage()
-
getItemsPerPage
int getItemsPerPage()
-
setActualEndDate
void setActualEndDate(DateTime actualEndDate)
-
-
-
-