public OCommandContext setChild ( final OCommandContext iContext ) { if ( iContext == null ) { if ( child != null ) { // REMOVE IT child . setParent ( null ) ; child = null ; } } else if ( child != iContext ) { // ADD IT child = iContext ; iContext . setParent ( this ) ; } return this ; }
Set the inherited context avoiding to copy all the values every time .