~stephan-pagel/jhelioviewer/jhv-timeline

« back to all changes in this revision

Viewing changes to src/jhv/src/org/helioviewer/jhv/gui/components/timeline/gui/events/EventDetailCurvePoint.java

  • Committer: Stephan Pagel
  • Date: 2010-09-25 15:35:13 UTC
  • Revision ID: stephan.pagel@gmx.de-20100925153513-kv7jytgo2tdz0hu6
timeline connected with HEK

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.helioviewer.jhv.gui.components.timeline.gui.events;
 
2
 
 
3
import org.helioviewer.jhv.internal_plugins.overlay.hek.cache.HEKEvent;
 
4
 
 
5
public class EventDetailCurvePoint implements EventCurvePoint {
 
6
    
 
7
    private final HEKEvent event;
 
8
    
 
9
    public EventDetailCurvePoint(final HEKEvent event) {
 
10
        this.event = event;
 
11
    }
 
12
    
 
13
    public Long getTimestamp() {
 
14
        return new Long(event.getDuration().getStart().getTime());
 
15
    }
 
16
    
 
17
    public Long getValue() {
 
18
        return new Long(event.getDuration().getEnd().getTime());
 
19
    }
 
20
    
 
21
    @Override
 
22
    public boolean equals(Object obj) {
 
23
        return (obj instanceof EventFrequencyCurvePoint) && ((EventFrequencyCurvePoint)obj).getTimestamp().equals(this.getTimestamp()); 
 
24
    }
 
25
    
 
26
    @Override
 
27
    public int hashCode() {
 
28
        return this.getTimestamp().hashCode();
 
29
    }
 
30
}