mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +02:00
ef4c5eb65e
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
39 lines
1.0 KiB
Java
39 lines
1.0 KiB
Java
package com.twitter.search.earlybird.common.userupdates;
|
|
|
|
import java.util.Date;
|
|
|
|
import com.twitter.search.common.indexing.thriftjava.UserUpdateType;
|
|
|
|
/**
|
|
* Contains an update for a user.
|
|
*/
|
|
public class UserUpdate {
|
|
public final long twitterUserID;
|
|
public final UserUpdateType updateType;
|
|
public final int updateValue;
|
|
private final Date updatedAt;
|
|
|
|
public UserUpdate(long twitterUserID,
|
|
UserUpdateType updateType,
|
|
int updateValue,
|
|
Date updatedAt) {
|
|
|
|
this.twitterUserID = twitterUserID;
|
|
this.updateType = updateType;
|
|
this.updateValue = updateValue;
|
|
this.updatedAt = (Date) updatedAt.clone();
|
|
}
|
|
|
|
@Override public String toString() {
|
|
return "UserInfoUpdate[userID=" + twitterUserID + ",updateType=" + updateType
|
|
+ ",updateValue=" + updateValue + ",updatedAt=" + getUpdatedAt() + "]";
|
|
}
|
|
|
|
/**
|
|
* Returns a copy of the updated-at date.
|
|
*/
|
|
public Date getUpdatedAt() {
|
|
return (Date) updatedAt.clone();
|
|
}
|
|
}
|