35 lines
976 B
Java
Raw Normal View History

2021-07-19 16:19:47 +02:00
package pl.jakubweg.objects;
import pl.jakubweg.SponsorBlockSettings;
2020-08-24 17:47:57 +02:00
public class SponsorSegment implements Comparable<SponsorSegment> {
public final long start;
public final long end;
public final SponsorBlockSettings.SegmentInfo category;
public final String UUID;
2022-02-07 16:15:22 +01:00
public final boolean isLocked;
2020-08-24 17:47:57 +02:00
2022-02-07 16:15:22 +01:00
public SponsorSegment(long start, long end, SponsorBlockSettings.SegmentInfo category, String UUID, boolean isLocked) {
2020-08-24 17:47:57 +02:00
this.start = start;
this.end = end;
this.category = category;
this.UUID = UUID;
2022-02-07 16:15:22 +01:00
this.isLocked = isLocked;
2020-08-24 17:47:57 +02:00
}
@Override
public String toString() {
return "SegmentInfo{" +
"start=" + start +
", end=" + end +
", category='" + category + '\'' +
2022-02-07 16:15:22 +01:00
", locked=" + isLocked +
2020-08-24 17:47:57 +02:00
'}';
}
@Override
public int compareTo(SponsorSegment o) {
return (int) (this.start - o.start);
}
}