Skip to content

Instantly share code, notes, and snippets.

@mntnorv
Created December 18, 2012 17:42
Show Gist options
  • Save mntnorv/4330170 to your computer and use it in GitHub Desktop.
Save mntnorv/4330170 to your computer and use it in GitHub Desktop.
public boolean containsValue(Value value) {
boolean contains = false;
for (Node<Key, Value> node: table) {
if (node != null) {
Node<Key, Value> next = node;
do {
if (value == next.value) {
contains = true;
}
} while ((next = node.next) != null);
if (contains) {
break;
}
}
}
return contains;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment