java.lang.Object
org.autogui.base.mapping.GuiReprSet
- All Implemented Interfaces:
GuiRepresentation
a composition of representations.
if
match(GuiMappingContext) matches a member representation, it immediately stops the matching and returns true.
the matched member representation will be set to the context-
Nested Class Summary
Nested classes/interfaces inherited from interface org.autogui.base.mapping.GuiRepresentation
GuiRepresentation.GuiReprNone, GuiRepresentation.TreeString, GuiRepresentation.TreeStringComposite, GuiRepresentation.TreeStringValue -
Field Summary
FieldsFields inherited from interface org.autogui.base.mapping.GuiRepresentation
NONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(GuiRepresentation... rs) booleancheckAndUpdateSource(GuiMappingContext context) the class is basically used for matching; so the definition of the method is useless.fromJson(GuiMappingContext context, Object target, Object json) create a new value object from the JSON with treating the target as an old value, or update the target with the JSON contents.insert(GuiRepresentation... rs) booleanmatch(GuiMappingContext context) match the representation with the typeElement of the context, and if succeeded, it sets this representation to the context, and it might create sub-contexts for recursive matches *toJson(GuiMappingContext context, Object source) convert the source into JSON formattoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.autogui.base.mapping.GuiRepresentation
continueCheckAndUpdateSourceForChildren, fromHumanReadableString, fromJsonWithNamed, isJsonSetter, isTaskRunnerUsedFor, matchAndSetNotifiersAsInit, setNotifiersTree, shutdown, toHumanReadableString, toHumanReadableStringTree, toJsonWithNamed, toStringHeader
-
Field Details
-
representations
-
-
Constructor Details
-
GuiReprSet
public GuiReprSet()
-
-
Method Details
-
add
-
insert
-
match
Description copied from interface:GuiRepresentationmatch the representation with the typeElement of the context, and if succeeded, it sets this representation to the context, and it might create sub-contexts for recursive matches *- Specified by:
matchin interfaceGuiRepresentation- Parameters:
context- the context of the repr.- Returns:
- the matching result
-
checkAndUpdateSource
the class is basically used for matching; so the definition of the method is useless.- Specified by:
checkAndUpdateSourcein interfaceGuiRepresentation- Parameters:
context- the context of the repr.- Returns:
- the representation is updated or not
-
toJson
Description copied from interface:GuiRepresentationconvert the source into JSON format -
fromJson
Description copied from interface:GuiRepresentationcreate a new value object from the JSON with treating the target as an old value, or update the target with the JSON contents. the behavior can be varied by each representation, confirmed byGuiRepresentation.isJsonSetter().- Specified by:
fromJsonin interfaceGuiRepresentation- Parameters:
context- a context holds the representationtarget- the target object or nulljson- JSON objects representing the targetString,Number,Boolean,List,Mapor null- Returns:
- created object from the json, target if provided, or null.
-
toString
-