code: function() {
  
  			// ensure only TreeBindings are enhanced which have not been enhanced yet
  			if (!(this instanceof TreeBinding) || this._bIsAdapted) {
  				return;
  			}
  
  			// apply the methods of the adapters prototype to the TreeBinding instance
  			for (var fn in TreeBindingAdapter.prototype) {
  				if (TreeBindingAdapter.prototype.hasOwnProperty(fn)) {
  					this[fn] = TreeBindingAdapter.prototype[fn];
  				}
  			}
  
  			// make sure we have a parameter object
  			this.mParameters = this.mParameters || {};
  
  			// initialize the contexts
  			this._aRowIndexMap = [];
  
  			//Store length and threshold for all requests
  			this._iThreshold = 0;
  			this._iPageSize = 0;
  
  			//set the default auto expand mode
  			this.setAutoExpandMode(this.mParameters.autoExpandMode || TreeAutoExpandMode.Sequential);
  
  			//default value for collapse recursive
  			if (this.mParameters.collapseRecursive === undefined) {
  				this.bCollapseRecursive = true;
  			} else {
  				this.bCollapseRecursive = !!this.mParameters.collapseRecursive;
  			}
  
  			//create general tree structure
  			this._createTreeState();
  
  			this._bIsAdapted = true;
  		}
docs: Adapter for TreeBindings to add the ListBinding functionality and use the
  tree structure in list based controls.
  
  @alias sap.ui.model.TreeBindingAdapter
  @class
  @experimental This module is only for experimental and internal use!
  @protected