code: public int length(){
  		if(root.child==null){
  			return 0;
  		}
  		if(length>-1){
  			return length;
  		}
  		length=root.getChildCount();
  		return length;
  	}
docs: Returns the number of fields on this object
  
  @return the number of fields