public void add(WXDomObject child,int index){
  if (child == null || index < -1 || sDestroy.get()) {
    return;
  }
  if (children == null) {
    children=new ArrayList<>();
  }
  int count=children.size();
  index=index >= count ? -1 : index;
  if (index == -1) {
    children.add(child);
    super.addChildAt(child,super.getChildCount());
  }
 else {
    children.add(index,child);
    super.addChildAt(child,index);
  }
  child.parent=this;
}

public void add ( WXDomObject child , int index ) { if ( child == null || index < - 1 || sDestroy . get ( ) ) { return ; } if ( children == null ) { children = new ArrayList < > ( ) ; } int count = children . size ( ) ; index = index >= count ? - 1 : index ; if ( index == - 1 ) { children . add ( child ) ; super . addChildAt ( child , super . getChildCount ( ) ) ; } else { children . add ( index , child ) ; super . addChildAt ( child , index ) ; } child . parent = this ; }
add the given wxdomobject as this object ' s child at specified index .
