@Override @SuppressWarnings("EqualsWhichDoesntCheckParameterClass") public boolean equals(Object obj) { if (this == obj) { return true; } if (!(this instanceof AbstractCommand)) { return false; } final AbstractCommand<?> that = (AbstractCommand<?>) obj; return type == that.type && timestamp == that.timestamp && author.equals(that.author); }
@Override public int hashCode() { return (revision.hashCode() * 31 + author.hashCode()) * 31 + (int) (when / 1000); }
@Override protected com.linecorp.centraldogma.common.Author doBackward(Author author) { return new com.linecorp.centraldogma.common.Author(author.getName(), author.getEmail()); } }
public Member(Author author, ProjectRole role, UserAndTimestamp creation) { this(requireNonNull(author, "author").email(), role, creation); }
@Override protected com.linecorp.centraldogma.common.Author doBackward(Author author) { return new com.linecorp.centraldogma.common.Author(author.getName(), author.getEmail()); } }
public Member(Author author, ProjectRole role, UserAndTimestamp creation) { this(requireNonNull(author, "author").email(), role, creation); }
public static Author currentAuthor(ServiceRequestContext ctx) { final User user = ctx.attr(CURRENT_USER_KEY).get(); assert user != null; return user == User.DEFAULT ? Author.DEFAULT : new Author(user.name(), user.email()); }
public Member(Author author, ProjectRole role, UserAndTimestamp creation) { this(requireNonNull(author, "author").email(), role, creation); }
@Override @SuppressWarnings("EqualsWhichDoesntCheckParameterClass") public boolean equals(Object obj) { if (this == obj) { return true; } if (!(this instanceof AbstractCommand)) { return false; } final AbstractCommand<?> that = (AbstractCommand<?>) obj; return type == that.type && timestamp == that.timestamp && author.equals(that.author); }
@Override public int hashCode() { return (revision.hashCode() * 31 + author.hashCode()) * 31 + (int) (when / 1000); }
public static Author currentAuthor(ServiceRequestContext ctx) { final User user = ctx.attr(CURRENT_USER_KEY).get(); assert user != null; return user == User.DEFAULT ? Author.DEFAULT : new Author(user.name(), user.email()); }
public static UserAndTimestamp of(Author author) { return new UserAndTimestamp(requireNonNull(author, "author").email()); } }
@Override @SuppressWarnings("EqualsWhichDoesntCheckParameterClass") public boolean equals(Object obj) { if (this == obj) { return true; } if (!(this instanceof AbstractCommand)) { return false; } final AbstractCommand<?> that = (AbstractCommand<?>) obj; return type == that.type && timestamp == that.timestamp && author.equals(that.author); }
@Override public int hashCode() { return (revision.hashCode() * 31 + author.hashCode()) * 31 + (int) (when / 1000); }
public static Author currentAuthor(ServiceRequestContext ctx) { final User user = ctx.attr(CURRENT_USER_KEY).get(); assert user != null; return user == User.DEFAULT ? Author.DEFAULT : new Author(user.name(), user.email()); }
public static UserAndTimestamp of(Author author) { return new UserAndTimestamp(requireNonNull(author, "author").email()); } }