package org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model;
+import java.util.Objects;
+
/**
* Generic TimeEvent implementation
*
null);
}
+ @Override
+ public int hashCode() {
+ return Objects.hash(fEntry, fTime, fDuration, fValue);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ TimeEvent other = (TimeEvent) obj;
+ return Objects.equals(fEntry, other.fEntry) &&
+ Objects.equals(fTime, other.fTime) &&
+ Objects.equals(fDuration, other.fDuration) &&
+ Objects.equals(fValue, other.fValue);
+ }
+
@Override
public String toString() {
return getClass().getSimpleName() + " start=" + fTime + " end=" + (fTime + fDuration) + " duration=" + fDuration + (hasValue() ? (" value=" + fValue) : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$