public Variant merge ( Variant current , Collection < Variant > load ) { isValidVariant ( current ) ; // Build alt list List < Pair < Variant , List < AlternateCoordinate > > > loadAlts = updateCollapseDeletions ( current , load . stream ( ) . map ( v -> new MutablePair <> ( v , buildAltList ( v ) ) ) . filter ( p -> hasAnyOverlap ( current , p . getLeft ( ) , p . getRight ( ) ) ) ) . collect ( Collectors . toList ( ) ) ; mergeVariants ( current , loadAlts ) ; return current ; }
Merge a collection of variants into one variant .