public static ContentValues[] values(long restaurantId,Place place){
  List<OpeningHours> hours=place.getOpeningHours();
  if (!hours.isEmpty()) {
    int size=hours.size();
    List<ContentValues> vals=new ArrayList<>(size * 2);
    for (int i=0; i < size; i++) {
      OpeningHours hour=hours.get(i);
      DayOfWeek day=hour.getOpenDay();
      int time=hour.getOpenTime();
      if (day != null && time >= 0) {
        vals.add(values(restaurantId,OPEN,day,time));
      }
      day=hour.getCloseDay();
      time=hour.getCloseTime();
      if (day != null && time >= 0) {
        vals.add(values(restaurantId,CLOSE,day,time));
      }
    }
    return vals.toArray(new ContentValues[vals.size()]);
  }
  return null;
}

public static ContentValues [ ] values ( long restaurantId , Place place ) { List < OpeningHours > hours = place . getOpeningHours ( ) ; if ( ! hours . isEmpty ( ) ) { int size = hours . size ( ) ; List < ContentValues > vals = new ArrayList < > ( size * 2 ) ; for ( int i = 0 ; i < size ; i ++ ) { OpeningHours hour = hours . get ( i ) ; DayOfWeek day = hour . getOpenDay ( ) ; int time = hour . getOpenTime ( ) ; if ( day != null && time >= 0 ) { vals . add ( values ( restaurantId , OPEN , day , time ) ) ; } day = hour . getCloseDay ( ) ; time = hour . getCloseTime ( ) ; if ( day != null && time >= 0 ) { vals . add ( values ( restaurantId , CLOSE , day , time ) ) ; } } return vals . toArray ( new ContentValues [ vals . size ( ) ] ) ; } return null ; }
get values from the place ' s opening hours .
