public boolean add(Object obj_){
  _buf[_bottom]=obj_;
  _bottom=(_bottom == _buf.length - 1) ? 0 : _bottom + 1;
  if (_bottom == _top) {
    int oldLen=_buf.length;
    int newLen=oldLen * 2;
    Object[] newBuf=new Object[newLen];
    int topToEnd=oldLen - _top;
    int newTop=newLen - topToEnd;
    System.arraycopy(_buf,0,newBuf,0,_top);
    System.arraycopy(_buf,_top,newBuf,newTop,topToEnd);
    _buf=newBuf;
    _top=newTop;
    return true;
  }
  return false;
}

public boolean add ( Object obj_ ) { _buf [ _bottom ] = obj_ ; _bottom = ( _bottom == _buf . length - 1 ) ? 0 : _bottom + 1 ; if ( _bottom == _top ) { int oldLen = _buf . length ; int newLen = oldLen * 2 ; Object [ ] newBuf = new Object [ newLen ] ; int topToEnd = oldLen - _top ; int newTop = newLen - topToEnd ; System . arraycopy ( _buf , 0 , newBuf , 0 , _top ) ; System . arraycopy ( _buf , _top , newBuf , newTop , topToEnd ) ; _buf = newBuf ; _top = newTop ; return true ; } return false ; }
add an element to the bottom of the queue
