java - Getting an element from a Set -
Why not I can ask that there is an element equal to Element near you There is no other option, but to use the iterator: set provides an operation to get an element that is another element Is equal?
set & lt; Foo & gt; Set = ...; ... fu fu = new foo (1, 2, 3); Foo bar = set. Gate (af); // Foo
set in
bar So why can not I get that element? To clarify, the
par method is overridden, but it only checks one field, not all, so two
Foo Objects are considered equal to actually have different values, so I can not just use
foo .
in public static zero Net (string [] Args) {Set Set = New Hashet
Comments
Post a Comment