void addExpectedPolicy ( String expectedPolicy ) { if ( isImmutable ) { throw new IllegalStateException ( "PolicyNode is immutable" ) ; } if ( mOriginalExpectedPolicySet ) { mExpectedPolicySet . clear ( ) ; mOriginalExpectedPolicySet = false ; } mExpectedPolicySet . add ( expectedPolicy ) ; }
Adds an expectedPolicy to the expected policy set . If this is the original expected policy set initialized by the constructor then the expected policy set is cleared before the expected policy is added .