private static ImmutableSet < RelationID > attributeOccurrencesUnion ( QuotedID id , RAExpressionAttributes re1 , RAExpressionAttributes re2 ) { ImmutableSet < RelationID > s1 = re1 . attributeOccurrences . get ( id ) ; ImmutableSet < RelationID > s2 = re2 . attributeOccurrences . get ( id ) ; if ( s1 == null ) return s2 ; if ( s2 == null ) return s1 ; return ImmutableSet . < RelationID > builder ( ) . addAll ( s1 ) . addAll ( s2 ) . build ( ) ; }
treats null values as empty sets