public class StringToArrayConverter extends Object implements StringToMultiValueConverter
String
to array-type objectCOMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
Constructor and Description |
---|
StringToArrayConverter() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Class<String> type,
Class<?> multiValueType)
Accept the source type and target type or not
|
Object |
convert(String[] segments,
int size,
Class<?> targetType,
Class<?> elementType)
Convert the segments to multiple value object
|
int |
getPriority()
Get the priority
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convert
convertIfPossible, find, getSourceType
compareTo
public boolean accept(Class<String> type, Class<?> multiValueType)
MultiValueConverter
accept
in interface MultiValueConverter<String>
type
- the source typemultiValueType
- the multi-value typetrue
, or false
public Object convert(String[] segments, int size, Class<?> targetType, Class<?> elementType)
StringToMultiValueConverter
convert
in interface StringToMultiValueConverter
segments
- the String array of contentsize
- the size of multiple value objecttargetType
- the target typeelementType
- the element typepublic int getPriority()
Prioritized
getPriority
in interface Prioritized
minimum one
Copyright © 2011–2021 The Apache Software Foundation. All rights reserved.