Commit 3bc51210 authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Replaced == with nullsafe equals

parent 62dff83f
......@@ -21,6 +21,7 @@ import static de.cebitec.common.sequencetools.intervals.Intervals.operations;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
/**
*
......@@ -30,12 +31,12 @@ public class IntegerIntervalOperations implements IntervalOperations<Integer> {
@Override
public boolean beginsWith(Interval<Integer> fst, Interval<Integer> snd) {
return fst.as(Interval.Type.ZeroOpen).getStart() == snd.as(Interval.Type.ZeroOpen).getStart();
return Objects.equals(fst.as(Interval.Type.ZeroOpen).getStart(), snd.as(Interval.Type.ZeroOpen).getStart());
}
@Override
public boolean endsWith(Interval<Integer> fst, Interval<Integer> snd) {
return fst.as(Interval.Type.ZeroOpen).getEnd() == snd.as(Interval.Type.ZeroOpen).getEnd();
return Objects.equals(fst.as(Interval.Type.ZeroOpen).getEnd(), snd.as(Interval.Type.ZeroOpen).getEnd());
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment