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

org.jetbrains.android.util.ResourceFileData Maven / Gradle / Ivy

Go to download

A packaging of the IntelliJ Community Edition android-common library. This is release number 1 of trunk branch 142.

The newest version!
package org.jetbrains.android.util;

import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;
import java.util.List;

/**
* @author Eugene.Kudelevsky
*/
public class ResourceFileData {
  // order matters because of id assigning in R.java
  private final List myValueResources;

  private long myTimestamp;

  public ResourceFileData() {
    this(new ArrayList(), 0);
  }

  public ResourceFileData(@NotNull List valueResources, long timestamp) {
    myValueResources = valueResources;
    myTimestamp = timestamp;
  }

  @NotNull
  public List getValueResources() {
    return myValueResources;
  }

  public long getTimestamp() {
    return myTimestamp;
  }

  public void setTimestamp(long timestamp) {
    myTimestamp = timestamp;
  }

  public void addValueResource(@NotNull ResourceEntry entry) {
    myValueResources.add(entry);
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    ResourceFileData data = (ResourceFileData)o;

    if (myTimestamp != data.myTimestamp) return false;
    if (!myValueResources.equals(data.myValueResources)) return false;

    return true;
  }

  @Override
  public int hashCode() {
    int result = myValueResources.hashCode();
    result = 31 * result + (int)(myTimestamp ^ (myTimestamp >>> 32));
    return result;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy