Package Torello.Browser
Class RunTime.ObjectPreview
- java.lang.Object
-
- Torello.Java.JSON.BaseType
-
- Torello.Browser.RunTime.ObjectPreview
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- RunTime
public static class RunTime.ObjectPreview extends BaseType implements java.io.Serializable
Object containing abbreviated remote object value.
EXPERIMENTAL- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/RunTime.java
- Open New Browser-Tab: Torello/Browser/RunTime.java
File Size: 6,181 Bytes Line Count: 146 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field protected static long
serialVersionUID
For Object Serialization.Type Properties Modifier and Type Field String
description
String representation of the object.RunTime.EntryPreview[]
entries
List of the entries.boolean
overflow
True iff some of the properties or entries of the original object did not fit.RunTime.PropertyPreview[]
properties
List of the properties.String
subtype
Object subtype hint.String
type
Object type.
-
Constructor Summary
Constructors Constructor Description ObjectPreview(String type, String subtype, String description, boolean overflow, RunTime.PropertyPreview[] properties, RunTime.EntryPreview[] entries)
ConstructorObjectPreview(JsonObject jo)
JSON Object Constructor
-
Method Summary
Generate Array that Indicates which Parameter are Optional Modifier and Type Method boolean[]
optionals()
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null.Methods: class java.lang.Object Modifier and Type Method boolean
equals(Object other)
Checks whether'this'
equals an input Java-Object
int
hashCode()
Generates a Hash-Code for'this'
instance
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
For Object Serialization. java.io.Serializable- See Also:
- Constant Field Values
-
type
public final java.lang.String type
Object type.
-
subtype
public final java.lang.String subtype
Object subtype hint. Specified forobject
type values only.
OPTIONAL
-
description
public final java.lang.String description
String representation of the object.
OPTIONAL
-
overflow
public final boolean overflow
True iff some of the properties or entries of the original object did not fit.
-
properties
public final RunTime.PropertyPreview[] properties
List of the properties.
-
entries
public final RunTime.EntryPreview[] entries
List of the entries. Specified formap
andset
subtype values only.
OPTIONAL
-
-
Constructor Detail
-
ObjectPreview
public ObjectPreview(java.lang.String type, java.lang.String subtype, java.lang.String description, boolean overflow, RunTime.PropertyPreview[] properties, RunTime.EntryPreview[] entries)
Constructor- Parameters:
type
- Object type.
Acceptable Values: ["object", "function", "undefined", "string", "number", "boolean", "symbol", "bigint"]subtype
- Object subtype hint. Specified forobject
type values only.
Acceptable Values: ["array", "null", "node", "regexp", "date", "map", "set", "weakmap", "weakset", "iterator", "generator", "error", "proxy", "promise", "typedarray", "arraybuffer", "dataview", "webassemblymemory", "wasmvalue"]
OPTIONALdescription
- String representation of the object.
OPTIONALoverflow
- True iff some of the properties or entries of the original object did not fit.properties
- List of the properties.entries
- List of the entries. Specified formap
andset
subtype values only.
OPTIONAL
-
ObjectPreview
public ObjectPreview(JsonObject jo)
JSON Object Constructor- Parameters:
jo
- A Json-Object having data about an instance of'ObjectPreview'
.
-
-
Method Detail
-
optionals
public boolean[] optionals()
Description copied from class:BaseType
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null. When binding aJsonObject
to a Java-Object, if some of the expected fields for the Java-Object map to Properties which might be left-out or omitted, then that may be indicated by setting that fields array positionTRUE
.
NOTE: This array should have a length equal to the number of fields contained by the Java Object. The first boolean in the array should specify whether the first Object Field may by absent. The second boolean should specify whether the second Object Field is optional in the JSON - and so on and so forth...
-
equals
public boolean equals(java.lang.Object other)
Checks whether'this'
equals an input Java-Object
- Overrides:
equals
in classjava.lang.Object
- Code:
- Exact Method Body:
if (other == null) return false; if (other.getClass() != this.getClass()) return false; ObjectPreview o = (ObjectPreview) other; return Objects.equals(this.type, o.type) && Objects.equals(this.subtype, o.subtype) && Objects.equals(this.description, o.description) && (this.overflow == o.overflow) && Arrays.deepEquals(this.properties, o.properties) && Arrays.deepEquals(this.entries, o.entries);
-
hashCode
public int hashCode()
Generates a Hash-Code for'this'
instance- Overrides:
hashCode
in classjava.lang.Object
- Code:
- Exact Method Body:
return Objects.hashCode(this.type) + Objects.hashCode(this.subtype) + Objects.hashCode(this.description) + (this.overflow ? 1 : 0) + Arrays.deepHashCode(this.properties) + Arrays.deepHashCode(this.entries);
-
-