|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Observable
displayablecollections.DisplayableHashMap<K,V>
displayablecollections.DisplayableLinkedHashMap<K,V>
public class DisplayableLinkedHashMap<K,V>
A DisplayableLinkedHashMap encapsulates a LinkedHashMap and allows it to be displayed by a JList
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface displayablecollections.DisplayableMap |
|---|
DisplayableMap.MapChangedNotification<K,V> |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
DisplayableLinkedHashMap()
Constructs a new empty Map |
|
DisplayableLinkedHashMap(int initialCapacity)
Constructs a new empty Map with the specified initial capacity |
|
DisplayableLinkedHashMap(int initialCapacity,
float loadFactor)
Constructs a new empty Map with the specified initial capacity and load factor |
|
DisplayableLinkedHashMap(java.util.Map<? extends K,? extends V> m)
Constructs a new Map containing the elements in the specified collection |
|
| Method Summary | |
|---|---|
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
Returns a set view of the mappings contained in this map. |
boolean |
equals(java.lang.Object o)
|
V |
get(java.lang.Object key)
|
int |
hashCode()
|
boolean |
isEmpty()
|
java.util.Set<K> |
keySet()
Returns a set view of the keys contained in this map. |
javax.swing.ListModel |
listModel()
Create a list model for displaying this map's values in a JList. |
V |
put(K key,
V value)
|
void |
putAll(java.util.Map<? extends K,? extends V> t)
|
V |
remove(java.lang.Object key)
|
int |
size()
|
javax.swing.ListModel |
valueOrderedListModel()
Create a list model for displaying the values in this map in a JList. |
javax.swing.ListModel |
valueOrderedListModel(java.util.Comparator<V> comparator)
Create a list model for displaying the values in this map in a JList. |
java.util.Collection<V> |
values()
Returns a collection view of the values contained in this map. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface displayablecollections.DisplayableMap |
|---|
addObserver, deleteObservers |
| Constructor Detail |
|---|
public DisplayableLinkedHashMap()
public DisplayableLinkedHashMap(int initialCapacity)
initialCapacity - the initial capacity
public DisplayableLinkedHashMap(int initialCapacity,
float loadFactor)
initialCapacity - the initial capacityloadFactor - the load factorpublic DisplayableLinkedHashMap(java.util.Map<? extends K,? extends V> m)
m - the Map whose mappings are to be placed in the Map| Method Detail |
|---|
public javax.swing.ListModel listModel()
DisplayableMaptoString() is what will actually be
displayed for each. There will be no necessary connection between
the order of display and any order in the map, since this
method can be invoked on any map implementing this interface. (The
method valueOrderedListModel specified below can be used
with any map if it is desired to display the values in some order based
on their natural order or that induced by a specified comparator.
For maps having an inherent order of keys,
keyOrderedListModel can also be used to display the values
in an order corresponding to the order of the keys.)
listModel in interface DisplayableMap<K,V>valueOrderedListModel() in this interface and
keyOrderedListModel in DisplayableSortedMappublic javax.swing.ListModel valueOrderedListModel()
DisplayableMaptoString() is what will actually be
displayed for each. The values will be displayed in an order determined
by the natural order of the values
valueOrderedListModel in interface DisplayableMap<K,V>public javax.swing.ListModel valueOrderedListModel(java.util.Comparator<V> comparator)
DisplayableMaptoString() is what will actually be
displayed for each. The values will be displayed in an order determined
by the specified comparator
valueOrderedListModel in interface DisplayableMap<K,V>comparator - the comparator to usepublic void clear()
clear in interface java.util.Map<K,V>public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<K,V>public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<K,V>public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
DisplayableMap
entrySet in interface DisplayableMap<K,V>entrySet in interface java.util.Map<K,V>public boolean equals(java.lang.Object o)
equals in interface java.util.Map<K,V>equals in class java.lang.Objectpublic V get(java.lang.Object key)
get in interface java.util.Map<K,V>public int hashCode()
hashCode in interface java.util.Map<K,V>hashCode in class java.lang.Objectpublic boolean isEmpty()
isEmpty in interface java.util.Map<K,V>public java.util.Set<K> keySet()
DisplayableMap
keySet in interface DisplayableMap<K,V>keySet in interface java.util.Map<K,V>
public V put(K key,
V value)
put in interface java.util.Map<K,V>public void putAll(java.util.Map<? extends K,? extends V> t)
putAll in interface java.util.Map<K,V>public V remove(java.lang.Object key)
remove in interface java.util.Map<K,V>public int size()
size in interface java.util.Map<K,V>public java.util.Collection<V> values()
values in interface DisplayableMap<K,V>values in interface java.util.Map<K,V>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||