public List < Object > getAsList ( String field , String separator ) { Object value = get ( field ) ; if ( value == null ) { return Collections . emptyList ( ) ; } else { if ( value instanceof List ) { return ( List ) value ; } else { return Arrays . < Object > asList ( value . toString ( ) . split ( separator ) ) ; } } }
Get the field as List . If field was not a list returns an UnmodifiableList . Do not modify the ObjectMap content .