19package org.sleuthkit.autopsy.timeline.ui.detailview.datamodel;
21import com.google.common.base.Preconditions;
22import com.google.common.collect.Sets;
23import static java.util.Collections.singleton;
24import static java.util.Comparator.comparing;
25import java.util.Objects;
26import java.util.Optional;
28import java.util.SortedSet;
29import org.sleuthkit.datamodel.TimelineLevelOfDetail;
30import org.sleuthkit.datamodel.TimelineEventType;
40 private final SortedSet<EventCluster>
clusters;
45 private final TimelineEventType
type;
55 private final TimelineLevelOfDetail
lod;
74 Preconditions.checkNotNull(stripeA);
75 Preconditions.checkNotNull(stripeB);
77 Preconditions.checkArgument(Objects.equals(stripeA.
lod, stripeB.
lod));
78 Preconditions.checkArgument(Objects.equals(stripeA.
type, stripeB.
type));
79 Preconditions.checkArgument(Objects.equals(stripeA.
parent, stripeB.
parent));
84 if (Objects.nonNull(
this.parent)) {
85 throw new IllegalStateException(
"Event Stripe already has a parent!");
91 TimelineLevelOfDetail
lod, SortedSet<EventCluster>
clusters,
131 return Optional.ofNullable(
parent);
139 return Optional.empty();
175 return clusters.first().getStartMillis();
180 return clusters.last().getEndMillis();
196 hash = 79 * hash + Objects.hashCode(this.clusters);
197 hash = 79 * hash + Objects.hashCode(this.type);
198 hash = 79 * hash + Objects.hashCode(this.description);
199 hash = 79 * hash + Objects.hashCode(this.lod);
200 hash = 79 * hash + Objects.hashCode(this.eventIDs);
212 if (getClass() != obj.getClass()) {
216 if (!Objects.equals(
this.description, other.
description)) {
219 if (!Objects.equals(
this.clusters, other.
clusters)) {
222 if (!Objects.equals(
this.type, other.
type)) {
225 if (this.lod != other.
lod) {
228 return Objects.equals(this.eventIDs, other.
eventIDs);
EventCluster withParent(EventStripe parent)
TimelineLevelOfDetail getDescriptionLevel()
Set< Long > getEventIDsWithTags()
Set< Long > getEventIDsWithHashHits()
TimelineEventType getEventType()
Set< Long > getEventIDs()
final Set< Long > hashHits
final SortedSet< EventCluster > clusters
Optional< EventStripe > getParentStripe()
TimelineEventType getEventType()
EventStripe withParent(EventCluster parent)
boolean equals(Object obj)
Optional< EventCluster > getParent()
final EventCluster parent
final Set< Long > eventIDs
EventStripe(EventCluster cluster)
Set< Long > getEventIDs()
Set< Long > getEventIDsWithTags()
SortedSet< EventCluster > getClusters()
EventStripe(EventCluster parent, TimelineEventType type, String description, TimelineLevelOfDetail lod, SortedSet< EventCluster > clusters, Set< Long > eventIDs, Set< Long > tagged, Set< Long > hashHits)
final TimelineLevelOfDetail lod
static EventStripe merge(EventStripe stripeA, EventStripe stripeB)
EventStripe(EventStripe stripeA, EventStripe stripeB)
Set< Long > getEventIDsWithHashHits()
final TimelineEventType type
TimelineLevelOfDetail getDescriptionLevel()