Class DynamicCompositeType.FixedValueComparator

    • Constructor Detail

      • FixedValueComparator

        public FixedValueComparator​(int cmp)
    • Method Detail

      • compareCustom

        public <VL,​VR> int compareCustom​(VL left,
                                               ValueAccessor<VL> accessorL,
                                               VR right,
                                               ValueAccessor<VR> accessorR)
        Description copied from class: AbstractType
        Implement IFF ComparisonType is CUSTOM Compares the byte representation of two instances of this class, for types where this cannot be done by simple in-order comparison of the unsigned bytes Standard Java compare semantics
        Overrides:
        compareCustom in class AbstractType<java.lang.Void>
      • decompose

        public java.nio.ByteBuffer decompose​(java.lang.Void value)
        Overrides:
        decompose in class AbstractType<java.lang.Void>
      • getString

        public <V> java.lang.String getString​(V value,
                                              ValueAccessor<V> accessor)
        Description copied from class: AbstractType
        get a string representation of the bytes used for various identifier (NOT just for log messages)
        Overrides:
        getString in class AbstractType<java.lang.Void>
      • fromString

        public java.nio.ByteBuffer fromString​(java.lang.String str)
        Description copied from class: AbstractType
        get a byte representation of the given string.
        Specified by:
        fromString in class AbstractType<java.lang.Void>
      • fromJSONObject

        public Term fromJSONObject​(java.lang.Object parsed)
        Description copied from class: AbstractType
        Given a parsed JSON string, return a byte representation of the object.
        Specified by:
        fromJSONObject in class AbstractType<java.lang.Void>
        Parameters:
        parsed - the result of parsing a json string
      • toJSONString

        public java.lang.String toJSONString​(java.nio.ByteBuffer buffer,
                                             ProtocolVersion protocolVersion)
        Description copied from class: AbstractType
        Converts the specified value into its JSON representation.

        The buffer position will stay the same.

        Overrides:
        toJSONString in class AbstractType<java.lang.Void>
        Parameters:
        buffer - the value to convert
        protocolVersion - the protocol version to use for the conversion
        Returns:
        a JSON string representing the specified value
      • validate

        public void validate​(java.nio.ByteBuffer bytes)
        Overrides:
        validate in class AbstractType<java.lang.Void>