org.mymedialite.data
Interface ITimedDataSet

All Superinterfaces:
java.util.Comparator<java.lang.Integer>, IDataSet
All Known Subinterfaces:
ITimedRatings
All Known Implementing Classes:
TimedRatings, TimedRatingsProxy

public interface ITimedDataSet
extends IDataSet, java.util.Comparator<java.lang.Integer>

interface for data sets with time information.


Method Summary
 int compare(java.lang.Integer index1, java.lang.Integer index2)
          Compares the dates of two entries in the Dataset.
 java.util.Date earliestTime()
          earliest time.
 java.util.Date latestTime()
          latest time.
 java.util.List<java.util.Date> times()
          the item entries.
 
Methods inherited from interface org.mymedialite.data.IDataSet
allItems, allUsers, buildItemIndices, buildRandomIndex, buildUserIndices, byItem, byUser, getIndex, getIndex, getItems, getUsers, items, maxItemID, maxUserID, randomIndex, removeItem, removeUser, size, tryGetIndex, tryGetIndex, users
 
Methods inherited from interface java.util.Comparator
equals
 

Method Detail

times

java.util.List<java.util.Date> times()
the item entries.


earliestTime

java.util.Date earliestTime()
earliest time.


latestTime

java.util.Date latestTime()
latest time.


compare

int compare(java.lang.Integer index1,
            java.lang.Integer index2)
Compares the dates of two entries in the Dataset.

Specified by:
compare in interface java.util.Comparator<java.lang.Integer>
Parameters:
index1 - the index of the first entry
index2 - the index of the second entry
Returns:
the value 0 if the date of the two entries is equal; a value less than 0 if the date of the first entry is before the date of the second entry; and a value greater than 0 if the date of the first entry is after the date of the second entry.