All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codetracker.VersionImpl Maven / Gradle / Ivy

Go to download

A refactoring-aware tool that can generate the commit change history of code elements with a very high accuracy.

There is a newer version: 2.6
Show newest version
package org.codetracker;

import org.codetracker.api.Version;

import java.util.Objects;

public class VersionImpl implements Version {
  private final String id;
  private final long time;
  private final long authoredTime;
  private final String authorName;

  public VersionImpl(String id, long time, long authoredTime, String authorName) {
    this.id = id;
    this.time = time;
    this.authoredTime = authoredTime;
    this.authorName = authorName;
  }

  @Override
  public String getId() {
    return this.id;
  }

  @Override
  public long getTime() {
    return this.time;
  }

  @Override
  public long getAuthoredTime() {
    return this.authoredTime;
  }

  @Override
  public String getAuthorName() {
    return authorName;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    VersionImpl version = (VersionImpl) o;
    return Objects.equals(id, version.id);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id);
  }

  @Override
  public String toString() {
    return String.format("<%s>", getId());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy