private ExternalNode3 combineExternalNodes ( ExternalNode3 n1 , ExternalNode3 n2 ) { if ( n1 == null || n2 == null ) { throw new IllegalArgumentException ( "Input nodes must not be null" ) ; } DecisionType combinedDecision = algo . combine ( n1 . getDecision ( ) , n2 . getDecision ( ) ) ; ExternalNode3 n = new ExternalNode3 ( combinedDecision ) ; // only accept OE that match with combined decision. List < ObligationExpression > oes1 = getFulfilledObligationExpressions ( n1 . getObligationExpressions ( ) , combinedDecision ) ; List < ObligationExpression > oes2 = getFulfilledObligationExpressions ( n2 . getObligationExpressions ( ) , combinedDecision ) ; n . getObligationExpressions ( ) . addAll ( oes1 ) ; n . getObligationExpressions ( ) . addAll ( oes2 ) ; return n ; }
Combine two external nodes following the algorithm in this . algo