java - Compare Serializable and Number -


I need to remove some objects from the list in the second list based on their ID.

I am trying to remove a to list based on the ID given in valid .

But the code returns the Set.contains always false , even if the ID is in the list .

Can anyone talk wrong with this code?

  Class A {Serializable ID; Public serial getId () {return ID; } Class B {limit> lieutenant; A & gt; Deleted (List & lt; a & gt; List, Set & lt; Number & gt; Valid) {Eitreter & lt; A & gt; This = list.iterator (); While (this hasNext ()) {if (valid.contains (it.next.getId ())} {it.remove (); }} Return list}  


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -