private static String jcalValueToString ( JCalValue value ) { List < JsonValue > values = value . getValues ( ) ; if ( values . size ( ) > 1 ) { List < String > multi = value . asMulti ( ) ; if ( ! multi . isEmpty ( ) ) { return VObjectPropertyValues . writeList ( multi ) ; } } if ( ! values . isEmpty ( ) && values . get ( 0 ) . getArray ( ) != null ) { List < List < String >> structured = value . asStructured ( ) ; if ( ! structured . isEmpty ( ) ) { return VObjectPropertyValues . writeStructured ( structured , true ) ; } } if ( values . get ( 0 ) . getObject ( ) != null ) { ListMultimap < String , String > object = value . asObject ( ) ; if ( ! object . isEmpty ( ) ) { return VObjectPropertyValues . writeMultimap ( object . getMap ( ) ) ; } } return VObjectPropertyValues . escape ( value . asSingle ( ) ) ; }
Converts a jCal value to its plain - text format representation .