public static JCalValue structured ( List < List < ? > > values ) { List < JsonValue > array = new ArrayList < JsonValue > ( values . size ( ) ) ; for ( List < ? > list : values ) { if ( list . isEmpty ( ) ) { array . add ( new JsonValue ( "" ) ) ; continue ; } if ( list . size ( ) == 1 ) { Object value = list . get ( 0 ) ; if ( value == null ) { value = "" ; } array . add ( new JsonValue ( value ) ) ; continue ; } List < JsonValue > subArray = new ArrayList < JsonValue > ( list . size ( ) ) ; for ( Object value : list ) { if ( value == null ) { value = "" ; } subArray . add ( new JsonValue ( value ) ) ; } array . add ( new JsonValue ( subArray ) ) ; } return new JCalValue ( new JsonValue ( array ) ) ; }
Creates a structured value .