java - Simple Set with only "contains" method -


I am looking for a simple set in Java that only provides the following functionality.

 set  add (string); Set contains (string s);   

There is no need to retrieve any elements of the set. I want to see what I have to do, to see whether the string is contained or not. Is there any such data structure in Java?

Edit: I know that I can use a set implementation like Hussett, etc. ... but I want a minimum data structure with only two methods listed above. / P>

EDIT2: Im has a memory constraint system.

Use, both of which have functionality, but this will not allow duplicates

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -