mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
some OpenTHashSet doc
This commit is contained in:
@@ -22,6 +22,9 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Makes some THashSet methods open to the public.
|
||||
* Adds {@link #get(Object)} method useful to intern objects.
|
||||
*
|
||||
* @author gregsh
|
||||
*/
|
||||
public class OpenTHashSet<T> extends THashSet<T> {
|
||||
@@ -66,6 +69,9 @@ public class OpenTHashSet<T> extends THashSet<T> {
|
||||
return (T)_set[index];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an element of this set equal to the give one. Can be used for interning objects to save memory.
|
||||
*/
|
||||
@Nullable
|
||||
public T get(final T obj) {
|
||||
final int index = index(obj);
|
||||
|
||||
Reference in New Issue
Block a user