public boolean deleteAttachmentPoint(long sw,short port){
  AttachmentPoint ap=new AttachmentPoint(sw,port,0);
  if (this.oldAPs != null) {
    ArrayList<AttachmentPoint> apList=new ArrayList<AttachmentPoint>();
    apList.addAll(this.oldAPs);
    int index=apList.indexOf(ap);
    if (index > 0) {
      apList.remove(index);
      this.oldAPs=apList;
    }
  }
  if (this.attachmentPoints != null) {
    ArrayList<AttachmentPoint> apList=new ArrayList<AttachmentPoint>();
    apList.addAll(this.attachmentPoints);
    int index=apList.indexOf(ap);
    if (index > 0) {
      apList.remove(index);
      this.attachmentPoints=apList;
      return true;
    }
  }
  return false;
}

public boolean deleteAttachmentPoint ( long sw , short port ) { AttachmentPoint ap = new AttachmentPoint ( sw , port , 0 ) ; if ( this . oldAPs != null ) { ArrayList < AttachmentPoint > apList = new ArrayList < AttachmentPoint > ( ) ; apList . addAll ( this . oldAPs ) ; int index = apList . indexOf ( ap ) ; if ( index > 0 ) { apList . remove ( index ) ; this . oldAPs = apList ; } } if ( this . attachmentPoints != null ) { ArrayList < AttachmentPoint > apList = new ArrayList < AttachmentPoint > ( ) ; apList . addAll ( this . attachmentPoints ) ; int index = apList . indexOf ( ap ) ; if ( index > 0 ) { apList . remove ( index ) ; this . attachmentPoints = apList ; return true ; } } return false ; }
delete ( sw , port ) from the list of list of attachment points and oldaps .
