api: make HashTable implement iterable

This commit is contained in:
Adam
2021-10-11 19:18:03 -04:00
parent e118ffc06e
commit 5b0acccbc7
2 changed files with 7 additions and 14 deletions

View File

@@ -24,13 +24,11 @@
*/
package net.runelite.api;
import java.util.Collection;
/**
* A data structure that uses a hash function to compute an index into an
* array of buckets from which node objects can be quickly obtained.
*/
public interface HashTable<T extends Node>
public interface HashTable<T extends Node> extends Iterable<T>
{
/**
* Gets a node by its hash value.
@@ -39,11 +37,4 @@ public interface HashTable<T extends Node>
* @return the associated node
*/
T get(long value);
/**
* Gets a collection of all nodes stored in this table.
*
* @return the nodes stored
*/
Collection<T> getNodes();
}