public class

DateFrequency

extends Object
java.lang.Object
   ↳ com.shinobicontrols.charts.DateFrequency

Class Overview

A date/time frequency, expressed as a quantity of time units. This the frequency type for a DateTimeAxis.

Summary

Nested Classes
enum DateFrequency.Denomination The unit of time: second, minute, hour, day, week, month, year. 
Public Constructors
DateFrequency()
Constructor.
DateFrequency(int quantity, DateFrequency.Denomination denomination)
Constructor.
Public Methods
DateFrequency clone()
Clones the object
boolean equals(Object o)
final DateFrequency.Denomination getDenomination()
Gets the unit of time.
final int getQuantity()
Gets the quantity of time units.
int hashCode()
void setDenomination(DateFrequency.Denomination denomination)
Sets the unit of time.
void setQuantity(int quantity)
Sets the quantity of time units.
long toMilliseconds()
Returns an approximate milliseconds representation of this DateFrequency.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DateFrequency ()

Constructor.

public DateFrequency (int quantity, DateFrequency.Denomination denomination)

Constructor.

Parameters
quantity The quantity of time units.
denomination The unit of time.

Public Methods

public DateFrequency clone ()

Clones the object

public boolean equals (Object o)

public final DateFrequency.Denomination getDenomination ()

Gets the unit of time.

Returns
  • The unit of time.

public final int getQuantity ()

Gets the quantity of time units.

Returns
  • The quantity of time units.
See Also

public int hashCode ()

public void setDenomination (DateFrequency.Denomination denomination)

Sets the unit of time.

Parameters
denomination the unit of time to set

public void setQuantity (int quantity)

Sets the quantity of time units.

Parameters
quantity the quantity to set
See Also

public long toMilliseconds ()

Returns an approximate milliseconds representation of this DateFrequency.

Note that because approximate values are used for the number of milliseconds in a particular DateFrequency.Denomination the returned value for this DateFrequency is in itself an approximation. For example, the number of milliseconds in January is different to the number of milliseconds in February but as DateFrequency does not deal with specific months an approximated value has to be returned.

Returns
  • an approximate milliseconds representation of this DateFrequency