Class DataType.LIST

  • Enclosing class:
    DataType

    public static final class DataType.LIST
    extends DataType
    List type that records maxIndex from spec, and uses that to expand a source (list) properly
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int maxIndexFromSpec  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private LIST​(int maxIndexFromSpec)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object createValue()
      MAP and LIST types overrides this method to return appropriate new map or list
      java.lang.Integer expand​(java.lang.Object input)
      LIST overrides this method to expand the source (list) such that in can support an index specified in spec that is outside the range input list, returns original size of the input
      boolean isCompatible​(java.lang.Object input)
      Determines if an input is compatible with current DataType
      • Methods inherited from class java.lang.Object

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

      • maxIndexFromSpec

        private final int maxIndexFromSpec
    • Constructor Detail

      • LIST

        private LIST​(int maxIndexFromSpec)
    • Method Detail

      • createValue

        protected java.lang.Object createValue()
        Description copied from class: DataType
        MAP and LIST types overrides this method to return appropriate new map or list
        Specified by:
        createValue in class DataType
      • expand

        public java.lang.Integer expand​(java.lang.Object input)
        Description copied from class: DataType
        LIST overrides this method to expand the source (list) such that in can support an index specified in spec that is outside the range input list, returns original size of the input
        Overrides:
        expand in class DataType
      • isCompatible

        public boolean isCompatible​(java.lang.Object input)
        Description copied from class: DataType
        Determines if an input is compatible with current DataType
        Specified by:
        isCompatible in class DataType