Class TypedVectorNode

java.lang.Object
tools.jackson.databind.JacksonSerializable.Base
tools.jackson.databind.JsonNode
tools.jackson.databind.node.BaseJsonNode
tools.jackson.databind.node.ContainerNode<tools.jackson.databind.node.ArrayNode>
tools.jackson.databind.node.ArrayNode
dev.frostlake.values.TypedVectorNode
All Implemented Interfaces:
Serializable, Iterable<tools.jackson.databind.JsonNode>, tools.jackson.core.tree.ArrayTreeNode, tools.jackson.core.TreeNode, tools.jackson.databind.JacksonSerializable, tools.jackson.databind.node.JsonNodeCreator

public final class TypedVectorNode extends tools.jackson.databind.node.ArrayNode
A VECTOR living inside a VARIANT: an array of its ELEMENTS, still knowing it is a vector.

★ THE ELEMENTS ARE NOT SPELLED THE DISPLAY WAY. A vector DISPLAYS at six decimals, but embedding it in a VARIANT writes the numbers at FULL PRECISION — a float32 element widened to float64 and printed in full, so 0.1234567 comes out 0.1234567016363144. Three surfaces, three spellings of the same element: display, this one, and TO_JSON's 15-decimal scientific form. Sharing a renderer between any two of them makes one of them wrong.

★ IT IS AN ARRAY THAT DOES NOT BEHAVE LIKE ONE. Live prints the member as a JSON array but answers NULL to element access, to a path into it and to ARRAY_SIZE — so the member is VECTOR-typed rather than an array that happens to hold numbers, and TYPEOF says so. Extending the array node is what makes the TEXT come out right without a custom writer; the identity is what keeps the access paths honest.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class tools.jackson.databind.JsonNode

    tools.jackson.databind.JsonNode.OverwriteMode

    Nested classes/interfaces inherited from interface tools.jackson.databind.JacksonSerializable

    tools.jackson.databind.JacksonSerializable.Base
  • Field Summary

    Fields inherited from class tools.jackson.databind.node.ContainerNode

    _nodeFactory

    Fields inherited from class tools.jackson.databind.node.BaseJsonNode

    OPT_FALSE, OPT_TRUE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    vectorValueOf(tools.jackson.databind.JsonNode node)
    The vector this member was built from, or null when the node is not one.

    Methods inherited from class tools.jackson.databind.node.ArrayNode

    _add, _at, _childrenEqual, _insert, _removeAt, _set, _valueDesc, _withArray, _withArrayAddTailElement, _withObject, _withObjectAddTailElement, _withXxxSetArrayElement, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addAll, addAll, addArray, addNull, addObject, addPOJO, addRawValue, asArray, asArrayOpt, asToken, deepCopy, elements, equals, equals, findParent, findParents, findValue, findValues, findValuesAsString, get, get, getNodeType, hashCode, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insertArray, insertNull, insertObject, insertPOJO, insertRawValue, isArray, isEmpty, isEmpty, optional, path, path, remove, removeAll, removeIf, replace, required, serialize, serializeWithType, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setNull, setPOJO, setRawValue, size, values, valueStream

    Methods inherited from class tools.jackson.databind.node.ContainerNode

    arrayNode, arrayNode, binaryNode, binaryNode, booleanNode, isContainer, missingNode, nullNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, objectNode, pojoNode, rawValueNode, remove, removeNulls, stringNode

    Methods inherited from class tools.jackson.databind.node.BaseJsonNode

    _asBoolean, _asString, _jsonPointerIfValid, _reportBigDecimalConversionNaNFail, _reportBigIntegerConversionFractionFail, _reportBigIntegerConversionNaNFail, _reportCoercionFail, _reportCoercionFail, _reportConversionFail, _reportDoubleConversionRangeFail, _reportFloatConversionRangeFail, _reportIntConversionFractionFail, _reportIntConversionNaNFail, _reportIntConversionRangeFail, _reportLongConversionFractionFail, _reportLongConversionNaNFail, _reportLongConversionRangeFail, _reportShortConversionFractionFail, _reportShortConversionRangeFail, _reportWrongNodeType, _withXxxMayReplace, _withXxxVerifyReplace, asBigInteger, asBigInteger, asBigIntegerOpt, asBoolean, asBoolean, asBooleanOpt, asDecimal, asDecimal, asDecimalOpt, asDouble, asDouble, asDoubleOpt, asFloat, asFloat, asFloatOpt, asInt, asInt, asIntOpt, asLong, asLong, asLongOpt, asObject, asObjectOpt, asShort, asShort, asShortOpt, asString, asString, asStringOpt, bigIntegerValue, bigIntegerValue, bigIntegerValueOpt, binaryValue, booleanValue, booleanValue, booleanValueOpt, decimalValue, decimalValue, decimalValueOpt, doubleValue, doubleValue, doubleValueOpt, findPath, floatValue, floatValue, floatValueOpt, intValue, intValue, intValueOpt, isEmbeddedValue, isMissingNode, longValue, longValue, longValueOpt, numberType, numberValue, required, shortValue, shortValue, shortValueOpt, stringValue, stringValue, stringValueOpt, toPrettyString, toString, traverse, withArray, withObject

    Methods inherited from class tools.jackson.databind.JsonNode

    _reportRequiredViolation, _reportUnsupportedOperation, _this, asOptional, asText, asText, at, at, canConvertToExactIntegral, canConvertToInt, canConvertToLong, canConvertToShort, findParents, findValues, findValuesAsString, forEachEntry, has, has, hasNonNull, hasNonNull, isBigDecimal, isBigInteger, isBinary, isBoolean, isDouble, isFloat, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isNull, isNumber, isObject, isPojo, isShort, isString, isTextual, isValueNode, iterator, map, missingAs, missingAs, nullAs, nullAs, optional, properties, propertyNames, propertyStream, require, requiredAt, requiredAt, requireNonNull, spliterator, textValue, withArray, withArray, withArray, withArrayProperty, withObject, withObject, withObject, withObjectProperty

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach

    Methods inherited from interface tools.jackson.databind.node.JsonNodeCreator

    textNode

    Methods inherited from interface tools.jackson.core.TreeNode

    at, at, isContainer, isEmbeddedValue, isMissingNode, isNull, isObject, isValueNode, numberType, propertyNames, traverse
  • Constructor Details

    • TypedVectorNode

      public TypedVectorNode(VectorValue vector)
  • Method Details

    • vectorValueOf

      public static VectorValue vectorValueOf(tools.jackson.databind.JsonNode node)
      The vector this member was built from, or null when the node is not one.