Class NdStringSet
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.db.NdStringSet
A container for storing a set of strings in the Database. The container allows only one instance of each
string to be stored.
This implementation should only be used when the set is expected to be small. It uses a singly linked list for storing strings in Database. Which means that a linear lookup is needed to find strings in the list. An in-memory, lazily-loaded, cache is provided so the list will only be fully retrieved once in the lifetime of this instance. A BTree will be more efficient for larger sets.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NdStringSet
- Throws:
org.eclipse.core.runtime.CoreException
-
-
Method Details
-
clearCaches
public void clearCaches() -
add
Adds the given string to the receiving set. May cause the entire list to be loaded from the Database while testing for uniqueness. Returns the record of the string that was inserted into the list.- Throws:
org.eclipse.core.runtime.CoreException
-
find
Search for the given string in the receiver. This could cause the entire list to be loaded from the Database. The results are cached, so the list will only be loaded one time during the lifetime of this instance. Returns the record of the String.- Throws:
org.eclipse.core.runtime.CoreException
-
remove
Return a pointer to the record of the String that was removed.- Throws:
org.eclipse.core.runtime.CoreException
-