Constructor and Description |
---|
ComplexData() |
Modifier and Type | Method and Description |
---|---|
abstract java.util.Map<java.lang.String,java.lang.Object> |
asMap()
Creates a map containing all the individual data points composing this complex data object.
|
java.util.Map<java.lang.String,java.lang.Object> |
changesFrom(T other)
Gets a map of changes that, when applied to
other , would result in data identical
to this one. |
public abstract java.util.Map<java.lang.String,java.lang.Object> asMap()
public class Point extends ComplexData<Point> {
private final double x;
private final double y;
}
should put the values of x
and y
into this map, with the keys "x"
and "y"
,
respectively. Note that these keys do not have to be the same as the field names, and may be completely arbitrary.
But the keys do have to be the same as those used by the corresponding ComplexDataType
to convert
a Map<String, Object>
to an instance of this class.public final java.util.Map<java.lang.String,java.lang.Object> changesFrom(T other)
other
, would result in data identical
to this one.other
- the complex data to base the changes off of