updating an vigilant within set
let's contend i have form application:
public category {
open int id;
open b b;
open boolean equals(object another) { relapse this.id == ((a)another).id; }
open int hashcode() { relapse 31 * id; //nice primary array }
}
and set structure. now, i have an vigilant form <a>a wish following:
- if
awithin set, transform the domainbreview object. - else, supplement set.
so checking there easy adequate (contains), adding set easy too. doubt this: i hoop transform vigilant within? interface set doesn't have get method, best i cruise mislay vigilant set supplement mine. another, even worse, choice camber set an iterator try locate object.
i'll gladly take improved suggestions... includes fit information structures.
yuval =8-)
edit: conclude answering... unfortunately i can't 'accept' best answers here, those advise controlling map, since changing form collection radically purpose wholly small impassioned (this collection already mapped by hibernate...)
Comments
Post a Comment