public class WidgetEntry
extends java.lang.Object
implements java.io.Externalizable
Modifier and Type | Field and Description |
---|---|
int |
key
The map entry's key.
|
java.lang.Object |
value
The map entry's value.
|
Constructor and Description |
---|
WidgetEntry() |
Modifier and Type | Method and Description |
---|---|
static void |
arrayToMap(WidgetEntry[] array,
java.util.Map target)
Add all elements of the given array of objects to the given map, using
the base ID (and the index position in the array) to properly
reconstitute the each associated widget ID (which is the key in the
map).
|
static WidgetEntry[] |
mapToArray(java.util.Map source)
Add all elements of the given map to a new array of objects that
properly encode both the key and the value.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
public int key
public java.lang.Object value
public static void arrayToMap(WidgetEntry[] array, java.util.Map target)
array
- The array of objects to add.target
- The map to fill.public static WidgetEntry[] mapToArray(java.util.Map source)
source
- The map to convert to an array.WidgetEntry
instances suitable for
externalization.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- The input source from which fields will be restored.java.io.IOException
- In case of I/O errors.java.lang.ClassNotFoundException
- If payload can't be instantiated.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The output destination to which fields will be saved.java.io.IOException
- In case of I/O errors.