private void copyPredicates ( ) { predicates = new ArrayList <> ( groups . size ( ) ) ; for ( List < Segment > group : groups ) { List < OffsetPredicate > groupPredicates = new ArrayList <> ( group . size ( ) ) ; for ( Segment segment : group ) { groupPredicates . add ( segment . offsetPredicate ( ) . copy ( ) ) ; } predicates . add ( groupPredicates ) ; } }
Creates a copy of offset predicates prior to compacting segments to prevent race conditions .