|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.archive.wayback.util.partition.Partition<T>
T - Generic type which this partition holds.public class Partition<T>
A class which holds elements of some type for a particular Date range. This class also has two additional application-usable fields: containsClosest: boolean - tracks whether this Partition holds the "closest" element of interest to an application total: int - independent counter for total internal application-level elements, useful when nesting partitions, to track the sum-of-totals of interior partitions
| Constructor Summary | |
|---|---|
Partition(Date start,
Date end)
Create a Partition for holding elements between the two argument Date objects. |
|
| Method Summary | |
|---|---|
void |
add(T o)
|
void |
addTotal(int numberToAdd)
Add and int to the Total count for this partition. |
boolean |
containsDate(Date d)
Checks if a date is within this partition |
int |
count()
|
Date |
getEnd()
|
Date |
getStart()
|
int |
getTotal()
|
boolean |
isContainsClosest()
|
Iterator<T> |
iterator()
|
List<T> |
list()
|
void |
setContainsClosest(boolean containsClosest)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Partition(Date start,
Date end)
start - Date representing the start of elements held in this
Partition, inclusive.end - Date representing the end of elements held in this Partition,
exclusive.| Method Detail |
|---|
public boolean containsDate(Date d)
d - Date to check
public Date getStart()
public Date getEnd()
public int count()
public void add(T o)
o - element to be added to this partition.public Iterator<T> iterator()
public List<T> list()
public boolean isContainsClosest()
public void setContainsClosest(boolean containsClosest)
containsClosest - the containsClosest to setpublic void addTotal(int numberToAdd)
numberToAdd - number to addpublic int getTotal()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||