org.gitective.core.stat
Class CommitCalendar

java.lang.Object
  extended by org.gitective.core.stat.CommitCalendar
All Implemented Interfaces:
Serializable

public class CommitCalendar
extends Object
implements Serializable

Commit calendar class that stores yearly commit activity.

This class supports obtaining the number of commits in a given month, day or hour of the day across all years. Also supported is obtaining the number of commits in each month, day or hour of the day as an array of integers.

See Also:
Serialized Form

Constructor Summary
CommitCalendar(UserCommitActivity[] activity)
          Create calendar from user activity
 
Method Summary
 int getCount()
          Get total number of commits for all years
 int getDayCount(int dayOfMonth)
          Get number of commits in given day of month
 int[] getDays()
          Get commit counts for each day of the month
 int getHourCount(int hour)
          Get number of commits in given hour
 int[] getHours()
          Get commit counts for each hour of the day
 int getMonthCount(int month)
          Get number of commits in given month
 int[] getMonths()
          Get commit counts for each month
 YearCommitActivity[] getYears()
          Get yearly activity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommitCalendar

public CommitCalendar(UserCommitActivity[] activity)
Create calendar from user activity

Parameters:
activity -
Method Detail

getYears

public YearCommitActivity[] getYears()
Get yearly activity

Returns:
non-null but possibly empty array

getMonths

public int[] getMonths()
Get commit counts for each month

Returns:
monthly counts

getDays

public int[] getDays()
Get commit counts for each day of the month

Returns:
day of month counts

getHours

public int[] getHours()
Get commit counts for each hour of the day

Returns:
hourly counts

getMonthCount

public int getMonthCount(int month)
Get number of commits in given month

Parameters:
month -
Returns:
monthly count

getHourCount

public int getHourCount(int hour)
Get number of commits in given hour

Parameters:
hour -
Returns:
hourly count

getDayCount

public int getDayCount(int dayOfMonth)
Get number of commits in given day of month

Parameters:
dayOfMonth -
Returns:
day of month count

getCount

public int getCount()
Get total number of commits for all years

Returns:
number of commits


Copyright © 2011-2012. All Rights Reserved.