cz.cuni.mff.d3s.spl.data.DataInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spl-evaluation-java Show documentation
Show all versions of spl-evaluation-java Show documentation
Stochastice Performance Logic is a formalism for capturing performance
assumptions. It is, for example, possible to capture assumption that
newer version of a function bar is faster than the previous version or
that library foobar is faster than library barfoo when rendering
antialiased text.
The purpose of this framework is to allow evaluation of SPL formulas
inside Java applications.
package cz.cuni.mff.d3s.spl.data;
import java.util.Map;
public class DataInfo {
private String id;
private String name = null;
private Map metadata = null;
public static DataInfo defaultInstance = new DataInfo("default");
public DataInfo(String id) {
this(id, null, null);
}
public DataInfo(String id, String name) {
this(id, name, null);
}
public DataInfo(String id, String name, Map metadata) {
this.id = id;
this.name = name;
this.metadata = metadata;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Map getMetadata() {
return metadata;
}
public void setMetadata(Map metadata) {
this.metadata = metadata;
}
@Override
public boolean equals(Object other) {
if (other == null) return false;
if (other == this) return true;
if (!(other instanceof DataInfo))return false;
DataInfo otherDataInfo = (DataInfo)other;
return otherDataInfo.id.equals(this.id);
}
@Override
public int hashCode() {
return id.hashCode();
}
}