Package convex.core.data
Class AObject
java.lang.Object
convex.core.data.AObject
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachEncoding(Blob data)
Attach the given encoding Blob to this object, if no encoding is currently cached Warning: Blob must be the correct canonical representation of this Cell, otherwise bad things may happen (incorrect hashcode, etc.)protected abstract Blob
Creates a Blob object representing this object.Gets the encoded byte representation of this cell.print()
Renders this object as a String valueabstract void
print(StringBuilder sb)
Prints this Object to a readable String Representation
-
Field Details
-
encoding
We cache the Blob for the binary encoding of this Cell
-
-
Constructor Details
-
AObject
public AObject()
-
-
Method Details
-
print
Prints this Object to a readable String Representation- Parameters:
sb
- StringBuilder to append to
-
print
Renders this object as a String value- Returns:
- String representation
-
getEncoding
Gets the encoded byte representation of this cell.- Returns:
- A blob representing this cell in encoded form
-
createEncoding
Creates a Blob object representing this object. Should be called only after the cached encoding has been checked.- Returns:
- Blob Encoding of Object
-
attachEncoding
Attach the given encoding Blob to this object, if no encoding is currently cached Warning: Blob must be the correct canonical representation of this Cell, otherwise bad things may happen (incorrect hashcode, etc.)- Parameters:
data
- Encoding of Value. Must be a correct canonical encoding.
-