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

com.almworks.jira.structure.api.attribute.UpToDateLoadedValue Maven / Gradle / Ivy

The newest version!
package com.almworks.jira.structure.api.attribute;

import com.atlassian.annotations.Internal;
import org.jetbrains.annotations.NotNull;

import java.util.Objects;

@Internal
final class UpToDateLoadedValue implements LoadedValue {
  @NotNull
  private final AttributeValue myValue;

  public UpToDateLoadedValue(@NotNull AttributeValue value) {
    myValue = value;
  }

  @NotNull
  @Override
  public AttributeValue getValue() {
    return myValue;
  }

  @Override
  public boolean isOutdated() {
    return false;
  }

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

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

  @Override
  public String toString() {
    return String.valueOf(myValue);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy