I need to save a set of data structures that are determined by a period of time (beginning, end) and a counter for this period, which contains some complex calculation results. A simplified definition of the data structure is as follows:
public class CounterBag {
private Period period;
private Counter counter;
}
the Periodas simple as:
public class Period {
public DateTime start;
public DateTime end;
}
, CounterBag, Periods.
( !) long timeInMillis, HashMap , equals hashcode CounterBag ( ). Period ( ). Period , , .
, API Java - , ? - , . CounterBag Period, .
.