public class Hashtable<K,V> extends Object
| Constructor and Description |
|---|
Hashtable() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
contains(K key)
Method checks hashtable contains key or not.
|
boolean |
contains(K key,
List<V> values)
Method checks hashtable contains key and List of values or not.
|
boolean |
contains(K key,
V value)
Method checks hashtable contains key and value or not.
|
List<V> |
get(K key)
Method returns given key's values.
|
List<V> |
getIf(K key,
java.util.function.Predicate filter)
Method returns List that given keys values provides given filter.
|
int |
length() |
int |
put(K key,
List<V> values)
Method puts given entry to table.
|
boolean |
put(K key,
V value)
Method puts given entry to table.
|
int |
put(K key,
V[] values)
Method puts given entry to table.
|
boolean |
remove(K key)
Method removes given key and it's values from hashtable.
|
boolean |
remove(K key,
V value) |
List<V> |
replace(K key,
List<V> newValues) |
boolean |
replace(K key,
V oldValue,
V newValue) |
int |
size() |
public boolean put(K key, V value)
key - keyvalue - valuepublic int put(K key, V[] values)
key - keyvalues - array of valuespublic int put(K key, List<V> values)
key - keyvalues - List of valuespublic boolean contains(K key)
key - key to search.public boolean contains(K key, V value)
key - key to search.value - value to searchpublic boolean contains(K key, List<V> values)
key - key to search.values - List of value to searchpublic List<V> get(K key)
key - keypublic List<V> getIf(K key, java.util.function.Predicate filter)
key - keyfilter - Predicatepublic boolean remove(K key)
key - keypublic void clear()
public boolean replace(K key, V oldValue, V newValue)
key - oldValue - newValue - public int size()
public int length()
Copyright © 2018 Terra Software Informatics LLC.. All rights reserved.