/** * Creates a list of maps from a list of class instances. * @param collection the collection we are coercing into a field value * @return the return value. */ @Override public List<Map<String, Object>> toListOfMaps(Collection<?> collection) { List<Map<String, Object>> list = new ArrayList<>(); for ( Object o : collection ) { list.add( toMap( o ) ); } return list; }
/** * Creates a list of maps from a list of class instances. * @param collection the collection we are coercing into a field value * @return the return value. */ @Override public List<Map<String, Object>> toListOfMaps(Collection<?> collection) { List<Map<String, Object>> list = new ArrayList<>(); for ( Object o : collection ) { list.add( toMap( o ) ); } return list; }
for ( int index = 0; index < length; index++ ) { Object item = Arry.fastIndex( value, index ); list.add( toMap( item ) ); for ( Object item : collection ) { if ( item != null ) { list.add( toMap( item ) ); map.put(fieldName, toMap(value)); break; final Map<String, Object> abstractMap = toMap(value); abstractMap.put("class", ClassMeta.className(value)); map.put(fieldName, abstractMap);
for ( int index = 0; index < length; index++ ) { Object item = Arry.fastIndex( value, index ); list.add( toMap( item ) ); for ( Object item : collection ) { if ( item != null ) { list.add( toMap( item ) ); map.put(fieldName, toMap(value)); break; final Map<String, Object> abstractMap = toMap(value); abstractMap.put("class", ClassMeta.className(value)); map.put(fieldName, abstractMap);