Class TypedArrayDecoder

  • Direct Known Subclasses:
    ValueDecoderFactory.BaseArrayDecoder

    public abstract class TypedArrayDecoder
    extends java.lang.Object
    Base class that defines decoder used for decoding multiple elements of an array type. Implementations typically use an embedded instance of TypedValueDecoder for decoding individual values.

    Set of concrete implementations is included in the reference implementation of the Typed Access API.

    Since:
    3.0
    Author:
    Tatu Saloranta
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract boolean decodeValue​(char[] buffer, int start, int end)  
      abstract boolean decodeValue​(java.lang.String input)
      Method called to decode single (element) value that given textual input contains and store it in result array.
      abstract int getCount()  
      abstract boolean hasRoom()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TypedArrayDecoder

        public TypedArrayDecoder()
    • Method Detail

      • decodeValue

        public abstract boolean decodeValue​(java.lang.String input)
                                     throws java.lang.IllegalArgumentException
        Method called to decode single (element) value that given textual input contains and store it in result array.
        Returns:
        True if decoding is complete, that is, no more elements can be added to contained array
        Throws:
        java.lang.IllegalArgumentException
      • decodeValue

        public abstract boolean decodeValue​(char[] buffer,
                                            int start,
                                            int end)
                                     throws java.lang.IllegalArgumentException
        Throws:
        java.lang.IllegalArgumentException
      • getCount

        public abstract int getCount()
        Returns:
        Number of elements decoded and contained
      • hasRoom

        public abstract boolean hasRoom()