|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.modules.wizard.MergeMap
public class MergeMap
A map which proxies a collection of sub-maps each of which has a unique id. Submaps can be added or removed en banc. Values from removed maps are retained; if push ("someKnownId") happens, the values previously added to the map while that ID was active reappear.
This allows us to implement backward/forward semantics for wizards, in which each pane (identified with a unique ID) can add its own settings to the settings map, but if the user presses the Back button, the settings from the formerly active pane can disappear - but if the user moves forward again, they are not lost.
Calling remove("someKeyBelongingToAnEarlierId") will completely remove that value; calling put ("someKeyBelongingToAnEarlierId", "newValue") replaces the earler value permanently.
This class is NOT AN API CLASS. There is no
commitment that it will remain backward compatible or even exist in the
future. The API of this library is in the packages org.netbeans.api.wizard
and org.netbeans.spi.wizard
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Constructor Summary | |
---|---|
MergeMap(java.lang.String currID)
Creates a new instance of MergeMap |
|
MergeMap(java.lang.String currId,
java.util.Map everpresent)
Creates a MergeMap with a set of key/value pairs that are always there (they came from a legacy wizard - used for bridging the old NetBeans wizards API and this one - some bridged wizards will have a first panel that gathered some settings using the old APIs framework, and we need to inject them here. |
Method Summary | |
---|---|
void |
clear()
|
boolean |
containsKey(java.lang.Object obj)
|
boolean |
containsValue(java.lang.Object obj)
|
java.lang.String |
currID()
Get the ID of the current sub-map being written into. |
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object obj)
|
boolean |
isEmpty()
|
java.util.Set |
keySet()
|
java.lang.String |
popAndCalve()
Remove the current sub-map. |
java.util.Map |
push(java.lang.String id)
Move to a different ID (meaning add a new named map to proxy which can be calved off if necessary). |
java.lang.Object |
put(java.lang.Object obj,
java.lang.Object obj1)
|
void |
putAll(java.util.Map map)
|
java.lang.Object |
remove(java.lang.Object obj)
|
int |
size()
|
java.lang.String |
toString()
|
java.util.Collection |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public MergeMap(java.lang.String currID)
public MergeMap(java.lang.String currId, java.util.Map everpresent)
Method Detail |
---|
public java.util.Map push(java.lang.String id)
public java.lang.String currID()
public java.lang.String popAndCalve()
public void clear()
clear
in interface java.util.Map
public boolean containsKey(java.lang.Object obj)
containsKey
in interface java.util.Map
public boolean containsValue(java.lang.Object obj)
containsValue
in interface java.util.Map
public java.util.Set entrySet()
entrySet
in interface java.util.Map
public java.lang.Object get(java.lang.Object obj)
get
in interface java.util.Map
public boolean isEmpty()
isEmpty
in interface java.util.Map
public java.util.Set keySet()
keySet
in interface java.util.Map
public java.lang.Object put(java.lang.Object obj, java.lang.Object obj1)
put
in interface java.util.Map
public void putAll(java.util.Map map)
putAll
in interface java.util.Map
public java.lang.Object remove(java.lang.Object obj)
remove
in interface java.util.Map
public int size()
size
in interface java.util.Map
public java.util.Collection values()
values
in interface java.util.Map
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |