public static void inheritClientBehaviorsAndSetPublicProperty ( IInheritedBehaviors inheritingObject , Iterable < BatchClientBehavior > baseBehaviors ) { // implement inheritance of behaviors List < BatchClientBehavior > customBehaviors = new ArrayList <> ( ) ; // if there were any behaviors, pre-populate the collection (ie: inherit) if ( null != baseBehaviors ) { for ( BatchClientBehavior be : baseBehaviors ) { customBehaviors . add ( be ) ; } } // set the public property inheritingObject . withCustomBehaviors ( customBehaviors ) ; }
Inherit the BatchClientBehavior classes from parent object