Skip to content

Commit

Permalink
Replace Guava ImmutableList with Java List in IntervalFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
julesjacobsen committed Sep 23, 2021
1 parent 8d8437b commit 3073868
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

package org.monarchinitiative.exomiser.core.filters;

import com.google.common.collect.ImmutableList;
import org.monarchinitiative.exomiser.core.model.ChromosomalRegion;
import org.monarchinitiative.exomiser.core.model.ChromosomalRegionIndex;
import org.monarchinitiative.exomiser.core.model.VariantEvaluation;
Expand All @@ -30,6 +29,7 @@
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/**
* VariantFilter variants according to a linkage interval. For instance, if the
Expand Down Expand Up @@ -64,7 +64,7 @@ public class IntervalFilter implements VariantFilter {
* @param interval the chromosomal region within which a variant will pass the filter.
*/
public IntervalFilter(ChromosomalRegion interval) {
this(ImmutableList.of(interval));
this(List.of(interval));
}

/**
Expand Down Expand Up @@ -92,7 +92,7 @@ private List<ChromosomalRegion> copySortDeDup(Collection<ChromosomalRegion> gene
return geneticIntervals.stream()
.distinct()
.sorted(ChromosomalRegion::compare)
.collect(ImmutableList.toImmutableList());
.collect(Collectors.toUnmodifiableList());
}

/**
Expand Down

0 comments on commit 3073868

Please sign in to comment.