K - the key typeV - the value typepublic class Groupable<K,V>
extends java.lang.Object
| 构造器和说明 |
|---|
Groupable(V defaultValue)
Instantiates a new groupable.
|
Groupable(V defaultValue,
java.util.Map<K,V> groupValues)
Instantiates a new groupable.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Groupable<K,V> |
addGroup(K group,
V value)
Adds the group.
|
boolean |
containsGroup(K group)
Contains group.
|
boolean |
containsValue(V value)
Contains value.
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
Entry set.
|
V |
getValue()
Gets the value.
|
V |
getValue(K group)
Gets the value.
|
V |
getValueByGroup(K group)
Gets the value by group.
|
java.util.Set<K> |
groupSet()
Group set.
|
V |
removeGroup(java.lang.Object key)
Removes the group.
|
java.util.Collection<V> |
values()
Values.
|
public Groupable(V defaultValue)
defaultValue - the default valuepublic Groupable<K,V> addGroup(K group, V value)
group - the groupvalue - the valuepublic V removeGroup(java.lang.Object key)
key - the keypublic V getValueByGroup(K group)
group - the grouppublic V getValue()
public boolean containsGroup(K group)
group - the grouppublic boolean containsValue(V value)
value - the valuepublic java.util.Set<K> groupSet()
public java.util.Collection<V> values()