org.gitective.core.stat
Class UserCommitActivity

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

public class UserCommitActivity
extends Object
implements Serializable

Activity class for storing all the commits attributed to a specific user.

This class provides the IDs and times for all commits attributed.

See Also:
Serialized Form

Field Summary
static int GROWTH
          Default growth percentage of expected commits
static int SIZE
          Default size of expected commits
 
Constructor Summary
UserCommitActivity(String name, String email)
          Create user activity for given name and e-mail address
 
Method Summary
 int getCount()
          Get number of commits
 long getEarliest()
          Get time of earliest commit
 String getEmail()
          Get e-mail address of user
 org.eclipse.jgit.lib.ObjectId getFirst()
          Get id of first commit
 org.eclipse.jgit.lib.ObjectId[] getIds()
          Get commits as array of object ids
 org.eclipse.jgit.lib.ObjectId getLast()
          Get id of latest commit
 long getLatest()
          Get time of latest commit
 String getName()
          Get name of user
 byte[][] getRawIds()
          Get raw commits as array of byte arrays
 long[] getTimes()
          Get commit times
 UserCommitActivity include(org.eclipse.jgit.revwalk.RevCommit commit, org.eclipse.jgit.lib.PersonIdent user)
          Include given commit in activity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE

public static final int SIZE
Default size of expected commits

See Also:
Constant Field Values

GROWTH

public static final int GROWTH
Default growth percentage of expected commits

See Also:
Constant Field Values
Constructor Detail

UserCommitActivity

public UserCommitActivity(String name,
                          String email)
Create user activity for given name and e-mail address

Parameters:
name -
email -
Method Detail

getName

public String getName()
Get name of user

Returns:
name

getEmail

public String getEmail()
Get e-mail address of user

Returns:
email

include

public UserCommitActivity include(org.eclipse.jgit.revwalk.RevCommit commit,
                                  org.eclipse.jgit.lib.PersonIdent user)
Include given commit in activity

Parameters:
commit - must be non-null
user - must be non-null
Returns:
this activity

getTimes

public long[] getTimes()
Get commit times

Returns:
non-null but possibly empty array

getRawIds

public byte[][] getRawIds()
Get raw commits as array of byte arrays

Returns:
non-null but possibly empty array

getIds

public org.eclipse.jgit.lib.ObjectId[] getIds()
Get commits as array of object ids

Returns:
non-null but possibly empty array

getCount

public int getCount()
Get number of commits

Returns:
commit count

getFirst

public org.eclipse.jgit.lib.ObjectId getFirst()
Get id of first commit

Returns:
commit id or null if no commits

getLast

public org.eclipse.jgit.lib.ObjectId getLast()
Get id of latest commit

Returns:
commit id or null if no commits

getEarliest

public long getEarliest()
Get time of earliest commit

Returns:
time in milliseconds or 0 if no commits

getLatest

public long getLatest()
Get time of latest commit

Returns:
time in milliseconds or 0 if no commits


Copyright © 2011-2012. All Rights Reserved.