int regist(ADJgAd ad) { int adId = ad.adId; if (ad.adId == 0) { this.adId += 1; adId = this.adId; } map[adId] = ad; return adId; }