java.lang.Object |
↳ |
com.tencent.smtt.sdk.DateSorter |
Class Overview
Sorts dates into the following groups:
Today
Yesterday
seven days ago
one month ago
older than a month ago
Summary
Fields |
public
static
int |
DAY_COUNT |
must be >= 3 |
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Fields
public
static
int
DAY_COUNT
Public Constructors
public
DateSorter
(Context context)
Parameters
context |
Application context
|
Public Methods
public
long
getBoundary
(int index)
Parameters
index |
date bin index as returned by getIndex() |
Returns
- date boundary at given index
public
int
getIndex
(long time)
Parameters
time |
time since the Epoch in milliseconds, such as that
returned by Calendar.getTimeInMillis() |
Returns
- an index from 0 to (DAY_COUNT - 1) that identifies which
date bin this date belongs to
public
String
getLabel
(int index)
Parameters
index |
date bin index as returned by getIndex() |
Returns
- string label suitable for display to user