Class ListConverter

java.lang.Object
org.asnlab.asndt.runtime.conv.AsnConverter
org.asnlab.asndt.runtime.conv.ListConverter
Direct Known Subclasses:
ArrayConverter, ArrayListConverter, LinkedListConverter, VectorConverter

public abstract class ListConverter extends AsnConverter
The ListConverter can convert SEQUENCE OF/SET OF value object to/from List This class is intent to be extended.
  • Constructor Details

    • ListConverter

      public ListConverter()
    • ListConverter

      public ListConverter(AsnConverter componentConverter)
  • Method Details

    • setComponentConverter

      public void setComponentConverter(AsnConverter componentConverter)
      Sets this ListConverter component converter
      Parameters:
      componentConverter - The component converter
    • getComponentConverter

      public AsnConverter getComponentConverter()
      Returns this ListConverter component converter.
      Returns:
      The component converter of this ListConverter
    • getSize

      public abstract int getSize(Object object)
      Answer the size of the SEQUENCE OF/SET OF value object
      Parameters:
      object - The SEQUENCE OF/SET OF value object
      Returns:
      The size of the SEQUENCE OF/SET OF value object
    • getComponentObject

      public abstract Object getComponentObject(Object object, int index)
      Answer the component object of the SEQUENCE OF/SET OF value object
      Parameters:
      object - The SEQUENCE OF/SET OF value object
      index - The index of the component object
      Returns:
      The component object of the SEQUENCE OF/SET OF value object
    • createObject

      public abstract Object createObject(int size)
      Given the size, create a (temporary) SEQUENCE OF/SET OF value object
      Parameters:
      size - The size of the SEQUENCE OF/SET OF value object
      Returns:
      The SEQUENCE OF/SET OF value object
    • addComponentObject

      public abstract void addComponentObject(Object object, Object componentObject)
      Add component object to the SEQUENCE OF/SET OF value object
      Parameters:
      object - The SEQUENCE OF/SET OF value object
      componentObject - The component object
    • toObject

      public abstract Object toObject(Object object)
      Return the final SEQUENCE OF/SET OF value object for the given temporary object
      Parameters:
      object - The list object
      Returns:
      The SEQUENCE OF/SET OF value object