public abstract class DataType extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DataType.LIST
List type that records maxIndex from spec, and uses that to expand a source (list) properly
|
static class |
DataType.MAP
MAP type class
|
static class |
DataType.RUNTIME
Runtime type
|
| Constructor and Description |
|---|
DataType() |
| Modifier and Type | Method and Description |
|---|---|
Object |
create(String keyOrIndex,
WalkedPath walkedPath,
OpMode opMode)
Creates an empty map/list, as required by spec, in the parent map/list at given key/index
|
protected abstract Object |
createValue()
MAP and LIST types overrides this method to return appropriate new map or list
|
static DataType |
determineDataType(int confirmedArrayAtIndex,
int confirmedMapAtIndex,
int maxExplicitIndex) |
Integer |
expand(Object source)
LIST overrides this method to expand the source (list) such that in can support
an index specified in spec that is outside the range input list, returns original size
of the input
|
abstract boolean |
isCompatible(Object input)
Determines if an input is compatible with current DataType
|
public static DataType determineDataType(int confirmedArrayAtIndex, int confirmedMapAtIndex, int maxExplicitIndex)
public abstract boolean isCompatible(Object input)
protected abstract Object createValue()
public Integer expand(Object source)
public Object create(String keyOrIndex, WalkedPath walkedPath, OpMode opMode)
keyOrIndex - of the parent object to createwalkedPath - containing the parent objectopMode - to determine if this write operation is allowedCopyright © 2023. All rights reserved.