Class OptionalDoubleDecoder

  • All Implemented Interfaces:
    Decoder<java.util.OptionalDouble>

    public final class OptionalDoubleDecoder
    extends java.lang.Object
    implements Decoder<java.util.OptionalDouble>
    Decodes an OptionalDouble type.
    • Constructor Detail

      • OptionalDoubleDecoder

        public OptionalDoubleDecoder()
    • Method Detail

      • priority

        public Priority priority()
        Description copied from interface: Decoder
        Priority for the decoder. Allows us to sort encoders when we have multiple matches.
        Specified by:
        priority in interface Decoder<java.util.OptionalDouble>
        Returns:
        Priority
      • name

        public java.lang.String name()
        Description copied from interface: Decoder
        Name of the encoder.
        Specified by:
        name in interface Decoder<java.util.OptionalDouble>
        Returns:
        encoder name
      • canDecode

        public boolean canDecode​(java.lang.String path,
                                 Tags tags,
                                 ConfigNode node,
                                 TypeCapture<?> type)
        Description copied from interface: Decoder
        true if this decoder matches the type capture.
        Specified by:
        canDecode in interface Decoder<java.util.OptionalDouble>
        Parameters:
        path - the current path
        tags - the tags for the current request
        node - the current node we are decoding.
        type - the type of object we are decoding.
        Returns:
        true if this decoder matches the type capture
      • decode

        public GResultOf<java.util.OptionalDouble> decode​(java.lang.String path,
                                                          Tags tags,
                                                          ConfigNode node,
                                                          TypeCapture<?> type,
                                                          DecoderContext decoderContext)
        Description copied from interface: Decoder
        Decode the current node. If the current node is a class or list we may need to decode sub nodes.
        Specified by:
        decode in interface Decoder<java.util.OptionalDouble>
        Parameters:
        path - the current path
        tags - the tags for the current request
        node - the current node we are decoding.
        type - the type of object we are decoding.
        decoderContext - The context of the current decoder.
        Returns:
        GResultOf the current node with details of either success or failures.