Class StringToIterableConverter<T extends java.lang.Iterable>

    • Constructor Detail

      • StringToIterableConverter

        public StringToIterableConverter()
    • Method Detail

      • accept

        public boolean accept​(java.lang.Class<java.lang.String> type,
                              java.lang.Class<?> multiValueType)
        Description copied from interface: MultiValueConverter
        Accept the source type and target type or not
        Specified by:
        accept in interface MultiValueConverter<T extends java.lang.Iterable>
        Parameters:
        type - the source type
        multiValueType - the multi-value type
        Returns:
        if accepted, return true, or false
      • convert

        public final java.lang.Object convert​(java.lang.String[] segments,
                                              int size,
                                              java.lang.Class<?> multiValueType,
                                              java.lang.Class<?> elementType)
        Description copied from interface: StringToMultiValueConverter
        Convert the segments to multiple value object
        Specified by:
        convert in interface StringToMultiValueConverter
        Parameters:
        segments - the String array of content
        size - the size of multiple value object
        multiValueType - the target type
        elementType - the element type
        Returns:
        multiple value object
      • createMultiValue

        protected abstract T createMultiValue​(int size,
                                              java.lang.Class<?> multiValueType)
      • getStringConverter

        protected java.util.Optional<StringConverter> getStringConverter​(java.lang.Class<?> elementType)
      • getSupportedType

        protected final java.lang.Class<T> getSupportedType()