@@ -0,0 +1,2463 @@
+package deterno.fight.tgm.damage.tracker.base;%0A%0Aimport com.google.common.base.Preconditions;%0Aimport com.google.common.collect.Lists;%0Aimport deterno.fight.tgm.damage.tracker.Damage;%0Aimport deterno.fight.tgm.damage.tracker.DamageInfo;%0Aimport deterno.fight.tgm.damage.tracker.Lifetime;%0Aimport org.joda.time.Instant;%0A%0Aimport javax.annotation.Nonnull;%0Aimport javax.annotation.Nullable;%0Aimport java.util.Collections;%0Aimport java.util.List;%0Aimport java.util.ListIterator;%0A%0Apublic class SimpleLifetime implements Lifetime %7B%0A    private Instant start;%0A    private Instant end;%0A    private final List%3CDamage%3E damage = Lists.newArrayList();%0A%0A    public @Nullable%0A    Instant getStart() %7B%0A        return this.start;%0A    %7D%0A%0A    public void setStart(@Nonnull Instant start) %7B%0A        Preconditions.checkNotNull(start, %22start%22);%0A%0A        this.start = start;%0A    %7D%0A%0A    public @Nullable%0A    Instant getEnd() %7B%0A        return this.end;%0A    %7D%0A%0A    public void setEnd(@Nonnull Instant end) %7B%0A        Preconditions.checkNotNull(end, %22end%22);%0A%0A        this.end = end;%0A    %7D%0A%0A    public @Nonnull%0A    List%3CDamage%3E getDamage() %7B%0A        return Collections.unmodifiableList(this.damage);%0A    %7D%0A%0A    public @Nonnull%0A    ListIterator%3CDamage%3E getDamageFirst() %7B%0A        return Collections.unmodifiableList(this.damage).listIterator();%0A    %7D%0A%0A    public @Nonnull%0A    ListIterator%3CDamage%3E getDamageLast() %7B%0A        return Collections.unmodifiableList(this.damage).listIterator(this.damage.size());%0A    %7D%0A%0A    public @Nullable%0A    Damage getFirstDamage() %7B%0A        if(!this.damage.isEmpty()) %7B%0A            return this.damage.get(0);%0A        %7D else %7B%0A            return null;%0A        %7D%0A    %7D%0A%0A    public @Nullable%0A    Damage getLastDamage() %7B%0A        if(!this.damage.isEmpty()) %7B%0A            return this.damage.get(this.damage.size() - 1);%0A        %7D else %7B%0A            return null;%0A        %7D%0A    %7D%0A%0A    public @Nullable%0A    Damage getLastDamage(@Nonnull Class%3C? extends DamageInfo%3E damageInfoClass) %7B%0A        Preconditions.checkNotNull(damageInfoClass, %22damage info class%22);%0A%0A        for(ListIterator%3CDamage%3E it = this.getDamageLast(); it.hasPrevious(); ) %7B%0A            Damage damage = it.previous();%0A            if(damageInfoClass.isInstance(damage.getInfo())) %7B%0A                return damage;%0A            %7D%0A        %7D%0A%0A        return null;%0A    %7D%0A%0A    public void addDamage(@Nonnull Damage damage) %7B%0A        Preconditions.checkNotNull(damage, %22damage%22);%0A%0A        this.damage.add(damage);%0A    %7D%0A%7D%0A

Create SimpleLifetime.java