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

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -