the-algorithm/src/java/com/twitter/search/earlybird/common/userupdates/UserUpdate.java
twitter-team ef4c5eb65e Twitter Recommendation Algorithm
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.
2023-03-31 17:36:31 -05:00

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();
}
}